Find the greater or smaller number between two numbers
/*
Name : C source program
Author : Funny Coder(Maniruzzman Akash)
It's a free code. You can use it anywhere
*/
#include<stdio.h>
int main(){
int num1, num2;
printf("\nEnter first number : ");
scanf("%d", &num1);
printf("\nEnter second number : ");
scanf("%d", &num2);
if(num1 > num2){
printf("\n%d is greater than %d\n", num1, num2);
}else if(num1 < num2){
printf("\n%d is less than %d\n", num1, num2);
}else{
printf("\n%d %d are equal\n", num1, num2);
}
return 0;
}
Fig- Greater or smaller C Program run |
No comments:
Post a Comment