Program Penentu Bilangan Bulat Ganjil Genap


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

int main(int argc, char** argv){

int a;

cout<<"PROGRAM PENENTU BILANGAN BULAT GANJIL GENAP"<<endl<<endl;

cout<<"Masukan bilangan bulat: ";
cin>>a;
 
if(a%2==0){
cout<<a<<" merupakan bilangan bulat genap"<<endl;
}else{
cout<<a<<" merupakan bilangan bulat ganjil"<<endl;
}

   return 0;
}

Comments