//Nama : I Nyoman Kuripan
//Mataram
//source http://www.chemicool.com/
#include
#include
using std::cout;
using std::endl;
#include
#include
#include
using std::rand;
using std::srand;
#include
#include
using std::time;
using namespace std;
int main ()
{
float na, ulang, menu, q, ll;
int a, b, c, d, e, f, g, x, n;
printf ("------------------------------------------------------------------------- \n");
printf("|\t\t###\t##\t# WARNING # \t##\t###\t\t|\n");
printf ("========================================================================= \n");
printf("|\t\t\tIni hanya program sederhana \t\t\t|\n");
printf("|\t Disarankan Pengguna hanya menekan 'angka' BUKAN 'huruf'\t|\n");
printf("|\t Karena program bisa menggila atau tak terkendali OK \t\t|\n");
printf ("------------------------------------------------------------------------- \n");
printf ("|ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| \n");
printf ("------------------------------------------------------------------------- \n\n");
x = 0;
for ( x = 0 ; x < n; x-- ){
printf("\t\t\t\t< MENU AWAL > \n\n");
printf("\t* Silahkan dipilih (1-2) ! \n\n");
printf("\t1) Informasi dan karakteristik atom \n");
printf("\t2) Game \n");
printf ("\t======================================== \n");
printf ("\t$ Masukkan pilihan Anda disini: ");
scanf ("%d", &a);
do{
switch (a){
case 1:
printf ("\n # 1) Informasi atom #\n");
printf ("\t=========================================== \n");
cout << "\t$ Masukan nomor atom suatu elektron! \t:";
cin >> na;
printf ("\t=========================================== \n");
if(na == 1) {
ifstream infile;
infile.open ("H.txt", ifstream::in);
while (infile.good())
cout << (char) infile.get();
infile.close();
printf ("Info lebih lengkap tekan 1 ! :\n");
scanf ("%d", &e);
switch (e){
case 1:
ifstream infile;
infile.open ("H1.txt", ifstream::in);
while (infile.good())
cout << (char) infile.get();
infile.close();
break;
}
}
....................................................................................
....................................................................................
}
cout<< "\n";
if (na else if (na>i) puts ("Nomor Atom yang anda masukkan 'SALAH', nilainya lebih rendah dari jawaban! ");
} while (na!=i);
puts ("Congratulations!");
cout << "Jawaban Anda tepat sekali \n\n";
break;
default:
printf ("Pilihan anda diluar jangkauan.\n");
printf ("Tekan sembarang kembali ke menu awal atau\n");
}printf ("Tekan satu angka untuk mengulang \n");
scanf ("%d", &ulang);
}while (ulang == 0);
}
return 0;
}
Setelah di Compile
Untuk selengkapnya download aja Program Sistem Konfigurasi Elektron In C++
Selamat Mencoba!!!!
Gambar yang lain disini !!
Tidak ada komentar:
Posting Komentar
Demi Sempurnanya ^ ^