Answer Posted / guest
#include<stdio.h>
main()
{
int num1,num2,num3,num4,num5;
clrscr();
printf("Please enter five numbers:");
scanf("%i,%i,%i,%i,%i",&num1,&num2,&num3,&num4,&num5);
if(num1>num2,num3,num4,num5)
{
printf("this number is the largest %i",num1);
}
else if(num2>num1,num3,num4,num5)
{
printf("this number is the largest %i",num2);
}
else if(num3>num2,num4,num5,num1)
{
printf("this number is the largest %i",num3);
}
else if(num4>num1,num2,num3,num5)
{
printf("this is the largest number %i",num4);
}
else if(num5>num1,num2,num3,num4)
{
printf("this is the largest number %i",num5);
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why ca not I do something like this?
How can you pass an array to a function by value?
What is scope rule of function in c?
Why #include is used in c language?
What are identifiers and keywords in c?
What are the advantages of union?
what do you mean by enumeration constant?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
Is array a primitive data type in c?
Why c is a mother language?
How can I get random integers in a certain range?
Differentiate between null and void pointers.
Explain setjmp()?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
Write a program to use switch statement.