Write a code snippets to find greatest and least of any
number of inputs without taking the help of array



Write a code snippets to find greatest and least of any number of inputs without taking the help o..

Answer / sundar

#include <stdio.h>
#include <conio.h>

void main(void)
{
unsigned int max = 0; unsigned int min = -1;unsigned int
wish = 1;

while(wish)
{
printf("\nEnter The Number sequence ( 0 to terminate ) . .
. ");
scanf("%d",&wish);
if(wish > max) max = wish;
if(wish < min) min = wish;
}
printf(" Max = %u Min = %u ",max,min );
}

Is This Answer Correct ?    4 Yes 5 No

Post New Answer

More Visual Basic Code Interview Questions

Write a Program in Visual Basic by means of which we can send any data from Visual basic program to any other application running on that machine whether that application supports OLE or not.....

1 Answers  


create a .dll component operation and use created component in another project. required methods events and properties. connect, add,search,data report

0 Answers  


problem no.3 - write a program using two dimentional arrays that compute the sum of data in rows and sum of data in columns of the 3*3 array variable. sample input/output dialog 5 9 8 = 22 3 8 2 = 13 4 3 9 = 16 _____________ 12 20 19

4 Answers   CSS,


I have string str="Arts And Props" now i want to replace space in string with null. means i want result as str="ArtsAndProps"

1 Answers  


how to generate Question paper and how to save pattern of question paper

2 Answers  






write a program to create a notepad using common dialog control and rich text box.

1 Answers  


Write a code snippets to find greatest and least of any number of inputs without taking the help of array

1 Answers   Infosys, Wipro,


how exactly is the lngColour used?

0 Answers  


I need help for Source Code & design of my school thesis enrollment system using visual basic 6.0/2008 database MS Access 2007. Please help me friends...Thanks...

1 Answers  


swap two no without using third variable

7 Answers  


Write a script to delete all the files in a folder except one desired file.

0 Answers  


Categories