Yoo kawan-kawan otaku-it disini mimin mau share cara membuat program ganjil genap dengan menggunakan C++ yuk langsung saja cek dibawah scriptnya:
//bilangan ganjil genap
//created by otaku-it
#include <iostream>
using namespace std;
int main(){
int a,hasil;
cout << "masukkan bilangan=";
cin >> a;
hasil=a%2;
if (hasil==0){
cout << "bilangan positif\n";
} else if(a){
cout << "bilangan ganjil\n";
}
}
Thursday, May 24, 2018
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment