#include<stdio.h>
#include<conio.h>
#include<iostream>
using namespace std;
int main()
{
int i;
struct
{
char nim[100];
char nama[100];
char nilai[100];
float mhs;
} mhs[5];
clrscr();
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