Kasus 5.2

Halo bro, lek, cyin....
wkwkwk.
Gimana kabar kalian semua? semoga kita semua baik-baik saja ya.
Kali ini aku akan membagikan source code untuk menentukan nilai terbesar dari 2 bilangan bulat.
yaudah langsung saja ya, gak usah lama-lama.
cekibrot.



#include <iostream>
#include <conio.h>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

void Nilbes(int a, int b) 
{ a>b ;}
main(){

int a,b;
cout<<"Menetukan nilai terbesar"<<endl;
cout<<"masukkan nilai 1 : "; cin>>a;
cout<<"masukkan nilai 2 : "; cin>>b;

if(a>b)
cout<<"nilai terbesar : "<<a<<endl;
else
cout<<"nilai terbesar : "<<b<<endl;

getch ();
}
Share on Google Plus

About Luthfi

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 komentar:

Posting Komentar