Sunday 8 April 2012

5).Find The Biggest of Three Numbers

#include<conio.h>
 #include<iostream.h>
#include<math.h>

void main()
{
 clrscr();

  int a,b,c;

  cout<<" ENTER THE THREE NUMBERS  ";
  cin>>a>>b>>c;

  if( a>b && a>c)
   {
    cout<<"The Greates Number is "<<a;
   }

  else
   if(b>a && b>c)
     {
      cout<<"The Greates Number is"<<b;

     }
   else
   if(c>a && c>b)
   {
    cout<<"The Geatest Number is"<<c;
   }
       getch();

No comments:

Post a Comment

Write a program which reads a set of integers into an integer array and then prints "YES"if all of them are same otherwise print "NO".

#include<stdio.h> int main() { int a[10],M=0,i,n; printf("enter a value for n\n"); scanf("%d",&n); fo...