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 |
How do i store a paragraph into a string? for example, if i input a long paragraph, the program will read the words one by one and concatenate them until no word is left.
Explain what is the benefit of using #define to declare a constant?
Explain how do you print only part of a string?
Why the use of alloca() is discouraged?
Function to find the given number is a power of 2 or not?
how can make variable not in registers
What are the scope of static variables?
fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? }
What is a floating point in c?
What are the concepts introduced in OOPs?
if a five digit number is input through the keyboard, write a program to calculate the sum of its digits. (hint:-use the modulus operator.'%')
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff