0
Program to display largest from any 10 numbers
void main () { int num,a,max; printf("Enter First Number"); scanf("%d",&num); max=num; for (a=1,a<=9;a++) { printf("Enter Next Number"); scanf("%d",num); if(max<num) max=num; } printf("largest=%d",max); }
2 Answers
+ 4
#include <stdio.h>
int main() {
//Program to display largest from any 10 numbers
//void main ()
//{
int num,a,max;
printf("Enter First Number");
scanf("%d",&num);
max=num;
for (a=1;a<=2;a++)
{
printf("Enter Next Number");
scanf("%d",&num);
if(max<num)
max=num;
}
printf("largest=%d",max);
//}
return 0;
}
0
The program didn't runs
Please help