write a program to find minimum of 3 number using arthmetic operation (subtraction) in c programming
Answers
Answered by
1
code:
#include<stdio.h>
int smallest(int a, int b, int c)
{
if(a-b>0){
if(a-c>0){
return a;
}else{ return c;}
}else{
if(b-c>0){
return b;
}else{return c;}
}
}
int main()
{
int x = 12, y = 15, z = 5;
printf("Minimum of 3 numbers is %d", smallest(x, y, z));
return 0;
}
Similar questions
History,
2 months ago
Chemistry,
2 months ago
Accountancy,
4 months ago
Biology,
9 months ago
English,
9 months ago