Arrange the any one of the order and store the memory in order vice
(ie.Ascending for Descending)
Then print the second data of that array
it is simple way
The 8051 is a microcontroller, not a microprocessor. To add or subtract, use the ADD or SUBB opcodes.
#include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("Enter any three numbers"); scanf("%d%d%d",&a,&b,&c); if(a>b&&a>c) printf("A is greatest"); else if(b>a&&a>c) printf("B is greatest"); else if(c>a&&c>b) printf("C is greatest"); if(a<b&&a<c) printf("A is smallest"); else if(b<a&&b<c) printf("B is smallest"); else if(c<a&&c<b) printf("C is smallest"); getch(); }
{ // set up our input buffer BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String currentLine; // store our ints in a list int smallest = 0; int largest = 0; // counter int numIntsRead = 0; // force smallest and largest to start as the first proper int entered while (numIntsRead < 1) { currentLine = in.readLine(); try { // convert from string to int int currentNumber = Integer.parseInt(currentLine); smallest = currentNumber; largest = currentNumber; ++numIntsRead; } catch (final NumberFormatException ex) { // we go here if the user didn't type in an integer } } // loop until we read all 5 ints while (numIntsRead < 5) { currentLine = in.readLine(); try { // convert from string to int int currentNumber = Integer.parseInt(currentLine); if (currentNumber < smallest) { smallest = currentNumber; } if (currentNumber > largest) { largest = currentNumber; } ++numIntsRead; } catch (final NumberFormatException ex) { // we go here if the user didn't type in an integer } } // display our findings System.out.println("Smallest:\t" + smallest); System.out.println("Largest:\t" + largest); }
int i, largest=0;do { scanf ("Enter a number (0 to exit): %d", i); if (i>largest) largest=i; } while (i!=0); printf ("Largest number is: %d\n", largest);
lxi h,0091h lda 0090hmvi b,03hcmp mjm 0015hinx hdcr bjnz 0008hsta 00a0hhltmov a,minx hjmp 0008h
The smallest number is 5,789. The largest is 98,750. The difference is 92,961.
A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.
Largest: 76542 Smallest: 24567
With repetition, the smallest is 22222 and the largest is 88888 Without repetition, the smallest is 23458 and the largest is 85432
Smallest: MCDXLIV = 1444 (CM would have given a smaller start but you cannot then place D). Largest: MDCLXVI = 1666
The 8051 is a microcontroller, not a microprocessor. To add or subtract, use the ADD or SUBB opcodes.
Using the "round to even" rule, they are 86 and 94.
You get the largest number if you sort the digits, from largest to smallest.
A sentence using the names of the largest and smallest continents would be "Sarah is going on a tour of the world and she going to visit Asia and Australia. North America is the 3rd largest continent.
smallest=1234 greatest=4321
The Range is the distance on the number line that the smallest number is from the biggest number, in sbsolute value. Basically, to find it using math, you would subtract the smallest number in the series of numbers from the largest number in the same series.
I like Asia and Australia.