Advertisement
mubaharu

Perulangan For

Nov 15th, 2018
1,730
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. awal:
  2. cout<<"Masukkan jumlah mahasiswa : ";
  3.     cin>>x;
  4.     if(x<=5){
  5.         cout<<"============================"<<endl;
  6.         goto inputan;  
  7.     }
  8.     else{
  9.         cout<<"Mahasiswa Kebanyakan Oe Nanti Pusing!"<<endl;
  10.         cout<<"Max 5 Aja Oe!"<<endl<<endl;
  11.         goto awal;
  12.     }
  13.    
  14.     //=============================================inputan
  15.     inputan:
  16.     for(int z=1;z<=x;z++){
  17.     cout<<"Masukkan NIM Mahasiswa ke "<<z<<" : ";
  18.     cin>>f[z].nim;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement