Thursday, 15 December 2011

if-else2


#pragma hdrstop
#include <stdio.h>
#include <conio.h>
#pragma argsused
void main()
{
clrscr();
int a,b,c;
printf("Masukkan bilangan A = ");scanf("%d",&a);
printf("Masukkan bilangan B = ");scanf("%d",&b);
printf("Masukkan bilangan C = ");scanf("%d",&c);
if(a>=b&&a>=c)
{
printf("Bilangan terbesar= %d",a);
}
else if(b>=a&&b>=c)
{
printf("Bilangan%d terbesar=",b);
}
else
{
printf("Bilangan%d terbesar",c);
}
getch();
}

No comments:

Post a Comment