Dibaca 3 bilangan bulat tampilkan bilangan terbesarnya

Program C++

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

int main(int argc, char** argv) {
int a,b,c;
cout<<"Bilangan pertama: ";cin>>a;
cout<<"Bilangan kedua: ";cin>>b;
cout<<"Bilangan ketiga: ";cin>>c;
if(a>b && a>c)
cout<<a<<" adalah bilangan terbesar";
else if(b>c && b>a)
cout<<b<< " adalah bilangan terbesar";
else
cout<<c<<" adalah bilangan terbesar";
return 0;
}


Logikanya Menggunakan Raptor


Share this:

ABOUT THE AUTHOR

Ceyron Louis

A web designer from India. And then you write some more information about yourself like this to fill out the space that is left.

0 komentar:

Posting Komentar