#include <cstdlib>
#include <iostream>
using namespace std;
struct mahasiswa{
int nim;
string nama;
};
int main()
{
mahasiswa a [10];//,b;
for(int i=0;i<3; i++){
cout<<"input nim 1:";
cin>>a[i].nim ;
cout<<"input nama 1: ";
cin>>a[i].nama;}
//cout<<"input nim 2:";
// cin>>b.nim ;
// cout<<"input nama 2: ";
//cin>>b.nama;
for(int i=0; i<3; i++){
cout<<"nim 1: "<<a[i].nim<<endl;
cout<<"nama 1: "<<a[i].nama<<endl;}
//cout<<"nim 2: "<<b.nim<<endl;
//cout<<"nama 2: "<<b.nama<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}
#include <iostream>
using namespace std;
struct mahasiswa{
int nim;
string nama;
};
int main()
{
mahasiswa a [10];//,b;
for(int i=0;i<3; i++){
cout<<"input nim 1:";
cin>>a[i].nim ;
cout<<"input nama 1: ";
cin>>a[i].nama;}
//cout<<"input nim 2:";
// cin>>b.nim ;
// cout<<"input nama 2: ";
//cin>>b.nama;
for(int i=0; i<3; i++){
cout<<"nim 1: "<<a[i].nim<<endl;
cout<<"nama 1: "<<a[i].nama<<endl;}
//cout<<"nim 2: "<<b.nim<<endl;
//cout<<"nama 2: "<<b.nama<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}
Tidak ada komentar:
Posting Komentar