how to find greatet of 10 numbers without using array?
Answer Posted / aman
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 ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a simple code fragment that will check if a number is positive or negative.
What is switch in c?
What language is c written?
Which is best linux os?
What is define c?
Why #include is used in c language?
Disadvantages of C language.
explain what is a newline escape sequence?
What is the value of h?
What are categories used for in c?
What are run-time errors?
Explain heap and queue.
Can you think of a logic behind the game minesweeper.
What does the c in ctime mean?
Is it possible to pass an entire structure to functions?