how to find greatet of 10 numbers without using array?
Answers were Sorted based on User's Feedback
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 ? | 9 Yes | 2 No |
Answer / 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 |
Answer / guest
using ? And & operator wa can find out the soution
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
How can a process change an environment variable in its caller?
What is static identifier?
What is wrong in this statement?
wt is diference between int and int pointer as same as float and float pointer and char and char pointer
Does c have enums?
what are bit fields in c?
What are the two forms of #include directive?
What are the loops in c?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?
How can I convert a number to a string?
What are local and global variables?