Minggu, 22 Januari 2012

Bilangan Terbesar

#include
main()
{ char n(20);
cout<< "\t============ALFIKRI============\n"<
cout<< "\t===Media Teknologi Informasi==="<
int data[6];
cout<<"\nMasukkan bilangan : "<
for (int i=0; i<=5; i++)
{
cout<<"Angka ke "<<<" : "; cin>>data[i];}

cout<< " Angka :" <
for ( int j=0; j
cout<<<" , ";
cout<

int maks=0;

for (i=0;i<6;i++)
{
if(data[i]>maks)
{
maks=data[i];
}
}
cout<<" Bilangan terbesar :"<<
cout<<
cout<<" fikri-it.blogspot.com\n\n";
return 0;
}


Hasilnya:

 

0 komentar:

Posting Komentar

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More