Category Archives: Struktur Control

Ganjil apa Genap ..

#include<iostream.h> #include<conio.h> using namespace std; int main() { char q; int bilangan,hasil; do{ system(“cls”); cout<<” | ===================================|”<<endl; cout<<” | Program Identifikasi Ganjil/Genap |”<<endl; cout<<” |===================================|”<<endl<<endl; cout<<” Masukkan Bilangan : “; cin>>bilangan; cout<<endl; hasil = bilangan%2; if (hasil == 0) { … Continue reading

Posted in Struktur Control | Leave a comment

perfect number ..

#include<iostream.h> #include<conio.h> using namespace std; int main() { char tanya; int bilangan,jumlah,i,sum,x; system(“cls”); cout<<” | ================================ |”<<endl; cout<<” | Program Perfect Number [ 1..1000 ] |”<<endl; cout<<” |================================ |”<<endl<<endl; cout<<endl; cout<<“ Perfect Number [1..1000] adalah : ” ; cout<<endl; for(int … Continue reading

Posted in Struktur Control | Tagged , , | Leave a comment