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
How many data structures are there in c?
How is = symbol different from == symbol in c programming?
what is use of malloc and calloc?
Why c language?
Where can I get an ansi-compatible lint?
what will be maximum number of comparisons when number of elements are given?
What is methods in c?
What would be an example of a structure analogous to structure c?
Is it better to bitshift a value than to multiply by 2?
Explain what is wrong in this statement?
What are inbuilt functions in c?
how to construct a simulator keeping the logical boolean gates in c
What is the difference between single charater constant and string constant?
What is quick sort in c?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }