0xCor3

while

Nov 16th, 2019
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. using namespace std;
  5.  
  6. main(){
  7.     int a = 1;
  8.     char nama[20], nim[11], tgl_lahir[10], program_studi[50], alamat[200];
  9.     while (a <= 10) {
  10.         cout << "Nama : "; gets(nama);
  11.         cout << "NIM  : "; gets(nim);
  12.         cout << "TL   : "; gets(tgl_lahir);
  13.         cout << "Program Studi : "; gets(program_studi);
  14.         cout << "Alamat : "; gets(alamat);
  15.         cout << "\n==================== HASIL ======================" << endl;
  16.         printf("= Nama : %s \n= NIM : %d \n= TL : %s \n= Program Studi : %s \n= Alamat : %s \n", nama, nim, tgl_lahir, program_studi, alamat);
  17.         cout << "=================================================\n" << endl;
  18.     }
  19. }
Add Comment
Please, Sign In to add comment