Programming Shortcut

Write, Run and execute Your programs with simple and esay way by Programming Shortcut

Monday, February 4, 2019

Bigger and smaller number in c programming

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 %d\n",a,b);
     }
     else{
     printf("%d is bigger number then %d\n",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 %d\n",a,b);
     }
     else{
     printf("%d is smaller number then %d\n",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!

Programming Shortcut is collections in java best programs with example, best c programs with example and best c++ programs with example, best way to learn java, c and c++

About Programming Shortcut

This is a programming learning website that can help you learn and when your write your programming code. And all programming code is compiled run programming code in the following programming language C, c++, Java, php and Javascript Languages. find your programming read, understand the programming then copy and past and run your program and save your golden time to typing the program becuse you learn more in leas time. All Programming is codeing is ease to understand the programming