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 x;
cout<<"mencari bilangan genap dan ganjil"<<endl;
cout<<"masukkan bilangan :";cin>>x;
if(x%2==0){
cout<<"genap";
}
else{
cout<<"ganjil";
}
return 0;
}
output raptor dan c++ :
0 komentar:
Posting Komentar