Menentukan Nilai Terbesar
Posted by Budi Arieyanto | Posted in Borlant C++ | Posted on 04.44
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,z,terbesar;
cout<<"masukkan bilangan X = ";cin>>x;
cout<<"masukkan bilangan Y = ";cin>>y;
cout<<"masukkan bilangan Z = ";cin>>z;
if ((x>=y)&&(x>=z))
{
terbesar=x;
}
else
{
if (y>=z)
terbesar = y;
else
terbesar = z;
}
cout<<"\n\nNilai terbesar adalah = "<<terbesar;
getch();
}


Comments (0)
Posting Komentar