C++ for, Input data

//lh3.googleusercontent.com/-K5UKWzgJhmU/AAAAAAAAAAI/AAAAAAAACdI/CN3nwiBZsGE/s512-c/photo.jpg
November 26, 2016




disini anda diminta memasukkan bayaknya data yang ingin anda masukkan kemudian masukkan identitas anda, silahkan mencoba.




#include <iostream>
#include <stdlib.h>

using namespace std;

int main()
{
    a:
    int z;
    char prodi[40],batch[40],choice(2);

    cout<<"Masukkan Banyaknya Data = ";
    cin>>z;
    for (int x=1;x<=2;x++)
    {
        cout<<" ";
        cin.getline(prodi,sizeof(prodi));

        cout<<"STUDY PROGRAM = ";
        cin.getline(prodi,sizeof(prodi));
        cout<<"BATCH         = ";
        cin.getline(batch,sizeof(batch));


    }
    cout<<"\nBack To Menu [Y/N] : ";
    cin>>choice;

    if(choice == 'y')
    {

        goto a;
    }
    else
        system("cls");
}


Related Post

SUBSCRIBE TO OUR NEWSLETTER

closed