Bigger and smaller number in c programming

  • on February 4, 2019
  • Likes!
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

//——-start code —–
     #include<stdio.h>
     #include<conio.h>
     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

//—– start code —–
     #include<stdio.h>
     #include<conio.h>
     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<b){
     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

Note: Output structure will same only change the result according to the input numbers by programmer


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 question about c programming send an email by contacting us form are given on page right side.
Thank You!

Article Categories:
Programs in c

Leave a Reply

Your email address will not be published. Required fields are marked *