Friday, March 29, 2019

C Language Program for to Find The Smallest From Two No’s.


BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER



Here you will get simple C program 
C Language Program for Find The Smallest From Two No’s..
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.
User will input two numbers and
then their Smallest number will be calculated and
finally it will be printed on screen.

The program coding is given below.
#include<stdio.h>
#include<conio.h>
void main()
{
 int a,b;
 clrscr();
  printf("Enter Value a&b= ");
  scanf("%d %d",&a,&b);
  if(a<b)
  {
   printf("A is Smallest");
  }
  else
  {
   printf("B is Smallest");
  }
 getch();
}
Output will be given after you compile it.

No comments:

Post a Comment