Wednesday, 22 August 2012
Greatest value between Three Numbers
06:32
1 comment
#include <stdio.h>
#include <conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter the A number : ");
scanf("%d",&a);
printf("Enter the A number : ");
scanf("%d",&b);
printf("Enter the C number : ");
scanf("%d",&c);
if(a>b)
{
if(a>c)
{
printf("A is the greatest Number.");
}
}
else
{
if(b>c)
{
printf("B is the greatest Number.");
}
else
{
printf("C is the greatest Number.");
}
}
getch();
}
Greatest value between Two Numbers
01:58
No comments
#include <stdio.h>
#include <conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter the first number : ");
scanf("%d",&a);
printf("Enter the second number : ");
scanf("%d",&b);
if(a>b)
{
printf("A is greater than B\n");
}
else
{
printf("B is greater than A\n");
}
getch();
}
Subscribe to:
Posts (Atom)