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 is the output on the screen? int n; n=printf("my name is %d",printf("kiran %d",printf("kumar"))); printf("\n %d \n",n);

4 Answers   TCS,


What is the difference between Printf(..) and sprint(...) ?

0 Answers   InterGraph,


how can i get output the following... 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 and 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 plz plz...

3 Answers  


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?

1 Answers  


How to write a code for random pick from 1-1000 numbers? The output should contain the 10 numbers from the range 1-1000 which should pick randomly, ie ,for each time we run the code we should get different outputs.

12 Answers   NetApp,






how to find your architecture is LittleEndian or BigEndian?

1 Answers  


Write a program to print numbers from 1 to 100 without using loop in c?

0 Answers  


Explain can you assign a different address to an array tag?

0 Answers  


Describe the modifier in c?

0 Answers  


What is the difference between functions abs() and fabs()?

0 Answers  


#include<stdio.h> main() { int a=1; int b=0; b=++a + ++a; printf("%d %d",a,b); }

7 Answers   Infosys,


how can u print a message without using any library function in c

1 Answers   NIIT,


Categories