how to find greatet of 10 numbers without using array?

Answer Posted / afreen chitragar

int main()
{
int i, num;
int greatest=0;

for(i=0; i<10; i++)
{
scanf("%d", &num);
if(num > greatest)
greatest = num;
}
printf("greatest = %d", greatest);
return 0;
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the modifier in c?

592


What is the difference between single charater constant and string constant?

615


What is time null in c?

573


What do you mean by recursion in c?

615


What 'lex' does?

710






What is the size of structure pointer in c?

604


What is auto keyword in c?

783


What is the use of volatile?

602


Is there a built-in function in C that can be used for sorting data?

737


What does the c in ctime mean?

557


Explain what is the difference between a free-standing and a hosted environment?

630


Can 'this' pointer by used in the constructor?

607


What are qualifiers and modifiers c?

537


What is the meaning of typedef struct in c?

579


What is c value paradox explain?

563