Program to find out the smaller number from given numbers


Program # 6: Find out the smaller Number

//Program to find out the smaller number from given numbers (Level - Low)
#include <iostream.h> 
#include <conio.h>

void main()
{

clrscr();
int a,b,c,min;
cout<<"Enter the value of a = "; cin>>a;
cout<<"Enter the value of b = "; cin>>b;
cout<<"Enter the value of c = "; cin>>c;

if (a<b)
if (a<c)
                               min = a;

if (b<a)
if(b<c)
     min = b;

if (c<a)
                           if(c<b)
                               min = c;

cout<<"The Smaller number is = "<<min; 

getch();
}


Post a Comment

0 Comments