Hello friends! Welcome to my website
C programming to find the bigger and smaller number between two numbers?
This c language programming is free all type of errors like compiler and runtime errors and this programming is tested to compile and then run the program code.
Here is only programming code only with their output.
Program to print the bigger number between two numbers
#include
#include
void main()
{
int a,b;
clrscr();//to clear prv. out of output console
// input numbers
printf(“Enter frist number: “);
scanf(“%d”,&b);
pirntf(“n”);//to change the new line
printf(“Enter second numbers: “);
scanf(“%d”,&b);
pirntf(“n”);//to change the new line
// condtion to check bigger no.
if(a>b){
printf(“%d is bigger number then %dn”,a,b);
}
else{
printf(“%d is bigger number then %dn”,b,a);
}
getch();
}
//—- end code —–
Output: Enter first number:8
Enter Second number:5
8 is bigger number then 5
Program to print the smaller number between two numbers
#include
#include
void main()
{
int a,b;
clrscr();
// input numbers
printf(“Enter frist number: “);
scanf(“%d”,&b);
pirntf(“n”);//to change the new line
printf(“Enter second numbers: “);
scanf(“%d”,&b);
pirntf(“n”);//to change the new line
// condtion to check smaller no.
if(a printf(“%d is smaller number then %dn”,a,b);
}
else{
printf(“%d is smaller number then %dn”,b,a);
}
getch();
}
//—- end code —–
Output: Enter first number:8
Enter Second number:5
5 is smaller number than 8
I make this programming and hope you are like the post if are you like the post you can please comment and share the post to reach more people.
If any dought about this c programming code or input & output please comment below
If you have other questions about c programming send an email by contacting us form is given on page right side.
Thank You!