#include<stdio.h>
#include<conio.h>
#include<iostream>
using namespace std;
main()
{
int i;
struct
{
int nim[100];
int nama[100];
int nilai[100];
float mhs;
} mhs[5];
for(i=1; i<=2; i++)
{
cout<<"masukan NIM = "; cin>>mhs[i].nim;
cout<<"masukan Nama = "; cin>>mhs[i].nama;
cout<<"masukan Nilai Akhir = "; cin>>mhs[i].nilai;
}
cout<<endl;
cout<<"data Mahasiswa"<<endl;
for(i=1; i<=2; i++)
{
cout<<"Data Ke – "<<i<<endl;
cout<<"NIM = "<<mhs[i].nim<<endl;
cout<<"Nama = "<<mhs[i].nama<<endl;
cout<<"Nilai Akhir = "<<mhs[i].nilai<<endl;
cout<<endl;
}
return 0;
}
Tidak ada komentar:
Posting Komentar