how to find greatet of 10 numbers without using array?

Answers were Sorted based on User's Feedback



how to find greatet of 10 numbers without using array?..

Answer / c.p.senthil

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

how to find greatet of 10 numbers without using array?..

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

how to find greatet of 10 numbers without using array?..

Answer / guest

using ? And & operator wa can find out the soution

Is This Answer Correct ?    0 Yes 0 No

how to find greatet of 10 numbers without using array?..

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

Post New Answer

More C Interview Questions

What are inbuilt functions in c?

0 Answers  


Write a program to exchange two variaables without temp

9 Answers   Geometric Software,


dibakar & vekatesh..uttejana here..abt ur reply for in place reversal of linked list..wats p stands for there?

1 Answers  


Can a pointer be static?

0 Answers  


Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

0 Answers  






I have one doubt. What does below statement mean? #define sizeof(operator) where operator can be int or float etc. Does this statement meaningful and where it can be used?

1 Answers  


Can you please explain the difference between syntax vs logical error?

0 Answers  


What is the method to save data in stack data structure type?

0 Answers  


Is c++ based on c?

0 Answers  


What is function prototype in c language?

0 Answers  


Which of the following about the C comments is incorrect ? a.commentscan go over multiple lines b.comments can start any where in the line c.a line can contain comments with out any language statements d.comments can occur within comments

6 Answers   TCS,


Why C language is a procedural language?

0 Answers   Ericsson,


Categories