Tag Archives: smallest

Write an 8086 assembly language program that finds the smallest and the second smallest number from a list of 10 numbers stored in memory. 7m Jun2008

Write an 8086 assembly language program that finds the smallest and the second smallest number from a list of 10 numbers stored in memory. 7m Jun2008 To understand program for Largest or Smallest in an array in detail Please Click this link below http://cssimplified.com/computer-organisation-and-assembly-language-programming/an-assembly-program-for-finding-the-largest-number-in-array-of-10-elements DATA SEGMENT ARR DB 5,3,7,1,9,2,6,8,4 LEN DW $-ARR SMALL DB ? SECOND… Read More »

Write a macro to find the smallest number among 3 given numbers. 7m Jun2007

Write a macro to find the smallest number among 3 given numbers. 7m Jun2007 Code: #include<stdio.h> #define MIN(X,Y)(X<Y ? X:Y) #define SMALL(X,Y,Z)(MIN(X,Y)<Z ? MIN(X,Y):Z) void main() { int FIRST,SECOND,THIRD; clrscr(); printf(“ENTER NUMBERS TO COMPARE\n”); printf(“\nFIRST NUMBER : “); scanf(“%d”, &FIRST); printf(“\nSECOND NUMBER : “); scanf(“%d”, &SECOND); printf(“\nTHIRD NUMBER : “); scanf(“%d”, &THIRD); printf(“\nThe SMALLER NUMBER IS… Read More »

C013 A C program that will take as input a set of integers and find and display the largest and the smallest values within the input data values

Let’s identify variables needed for this program. In this program, we need several variables to store and compare the values to find the largest and the smallest out of them. Its not recommended to take number of variables declared of the same data type with different names and remembering it. It becomes worst when the… Read More »