find the minimum of three values inputted by the user
Answers were Sorted based on User's Feedback
Answer / manish soni bca 3rd year jaipu
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,min;
printf("Enter the 3 values");
scanf("%d %d %d",&a,&b,&c);
if(a<b)
{
if(a<c)
min=a;
else
min=c;
}
else
{
if(b<c)
min=b;
else
min=c;
}
printf("the minimum numbers of %d,%d and %d is=%
d",a,b,c,min);
getch();
}
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / manish soni bca 3rd year jaipu
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,min;
printf("Enter the 3 values");
scanf("%d %d %d",&a,&b,&c);
min=a<b?(a<c?a:c):(b<c?b:c);
printf("the minimum numbers of %d,%d and %d is=%
d",a,b,c,min);
getch();
}
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / neha tibrewal
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
printf("Enter three numbers");
scanff("%d%d%d",&a,&b,&c);
if(a<b && a<c)
printf("Minimum is %d",a);
elseif(b<a && b<c)
printf("Minimum is %d",b);
else
printf("Minimum is %d",c);
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
What is action and transformation in spark?
what is the use of c program?
4 Answers Synergy, Web Synergies,
void main() { int x=25,y=32; clrscr(); x=x++ + y++; y=++x + ++y; printf("%d%d",x,y); }
Difference between Class and Struct.
13 Answers Ericsson, Motorola, Wipro,
consider the following program sigment int n,sum=1; switch(n) { case 2:sum=sum+2; case 3:sum*=2; break; default:sum=0;} if n=2, what is the value of sum a.0 b.6 c.3 d.none
What is a rvalue?
How can I implement a delay, or time a users response, with sub-second resolution?
write an algorithm to display a square matrix.
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
What is the most efficient way to store flag values?
Explain how can you be sure that a program follows the ansi c standard?
In C language, a variable name cannot contain?