Friday, August 19, 2011

Program to find the greatest number among two numbers.

//Program to find the greatest number among two numbers.
#include<stdio.h>
#include<conio.h>
void main()
{
 int a,b,c;
 clrscr();
 printf("The values of a and b");
 scanf("%d%d",&a,&b);
 if(a>b)
 {
  c=a;
  printf("\n Greatest no. is a");
 }
  else
  {
   c=b;
   printf("\n Greteat no. is b");
  }
 printf("\n Greatest no. is:%d",c);
 getch();
}

Previous Next Home
0 Comments
Comments

Leave a Comment

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Twitter Delicious Facebook Favorites More