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 the use of a semicolon (;) at the end of every program statement?
To find whether a number is even or odd without using any conditional operator??
12 Answers College School Exams Tests, IBM,
what is the purpose of the code, and is there any problem with it. bool f( uint n ) { return (n & (n-1)) == 0; }
What is difference between class and structure?
What is #line in c?
What is structure and union in c?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
what are the advantage of pointer variables? write a program to count the number of vowels and consonants in a given string
how to devloped c lenguege?
What is malloc return c?
Is this program statement valid? INT = 10.50;