Subscribe:

Jumat, 19 April 2013

Program struct selamat datang C++


#include
#include

using namespace std;
struct mahasiswa
{
       char nim [10];
       char nama [20];
       double ipk;
};

int main(int argc, char *argv[])
{
    mahasiswa data_mhs;
    cout<<"nim mahasiswa= "<    cin>>data_mhs.nim;
    cout<<"nama mahasiswa= "<    cin>>data_mhs.nama;
    cout<<"nilai ipk =";
    cin>>data_mhs.ipk;
   
    cout<<"selamat datang di kampus ITATS "<   
   
    system("PAUSE");
    return EXIT_SUCCESS;
}




0 komentar: