Calculate the area ofa circle,squareorcircle around theareamayneedbranchingtothe program,andfornowIuse aswitchcase. Directly to theheart of the matter,I've created thisprogramas simple aspossibletoavoidmistakesfornewprogrammersto learn,, This timeIgivedirecthisscriptc++,soyoucan simplycopyand paste :
cek: cout<<"Pilihan menu :\n"; cout<<"[1] Luas Lingkaran \n"; cout<<"[2] Luas Persegi \n"; cout<<"[3] Keliling Lingkaran \n"; cout<<"Masukkan pilihan anda : ";cin>>pil;
switch (pil){ case 1 : cout<<"Masukkan jari-jari : ";cin>>r; Luas=phi*(r*r); cout<<"\nLuas Lingkaran : "<<Luas<<endl<<endl; cout<<"Anda ingin mengulang?[1=ya,0=tdk] ";cin>>jwb; if(jwb==1) goto cek; else cout<<"Terima kasih"; break; case 2 : cout<<"Masukkan panjang : ";cin>>p; cout<<"Masukkan lebar : ";cin>>l; Luas=p*l; cout<<"\nLuas Persegi : "<<Luas<<endl<<endl; cout<<"Anda ingin mengulang?[1=ya,0=tdk] ";cin>>jwb; if(jwb==1) goto cek; else cout<<"Terima kasih"; break; case 3 : cout<<"Masukkan jari-jari : ";cin>>r; Kel=(phi*r)*2; cout<<"\nKeliling Lingkaran : "<<Kel<<endl<<endl; cout<<"Anda ingin mengulang?[1=ya,0=tdk] ";cin>>jwb; if(jwb==1) goto cek; else cout<<"Terima kasih"; break; default : cout<<"Maaf pilihan menu yang anda inputkan tidak terdaftar ";}
Many arestilldifficultiesinbreakingpopupa usernameandpassword, sotodayIwillexplainhowtobreak thepop-upusernameandpassword. wejustgocodinginthe loginbutton, type ascriptlike the onebelow.
when you finish,let'stry runningthe program. andpopupsthatwillappearlikethis.