Langsung saja gausah basa basi karna saya juga baru belajar c++ :D
source kode nya :
#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 bil;
cout<<"masukan bilangan bulat";
cin>>bil;
if(bil%2==0)
cout<<"bilangan genap";
else
cout<<"bilangan ganjil";
return 0;
}
outputnya :
source kode nya :
#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 bil;
cout<<"masukan bilangan bulat";
cin>>bil;
if(bil%2==0)
cout<<"bilangan genap";
else
cout<<"bilangan ganjil";
return 0;
}
outputnya :
0 komentar:
Posting Komentar