#include "conio.h"
#include "iostream.h"
#include "stdio.h"
#include "iomanip.h"
main()
{
int i,j,in;
char nama[8][30],kelas[8][10];
cout<<"\tData Mahasiswa"<<endl;
puts("--------------------------------------------------");
cout<<"Jumlah mahasiswa = ";cin>>in;
puts("--------------------------------------------------");
cout<<endl;
for(i=0;i<in;i++)
{
cout<<"Data ke - "<<i+1<<endl;
cout<<"Nama : ";gets(nama[i]);
cout<<"Kelas : ";gets(kelas[i]);
}
puts("---------------------------------------------------");
cout<<"Data Tersimpan "<<endl;
for(j=0;j<in;j++)
{
cout<<"Data ke - "<<j+1<<endl;
cout<<"Nama : "<<nama[j]<<endl;
cout<<"Kelas : "<<kelas[j]<<endl;
cout<<endl;
}
getch();
}
#include "iostream.h"
#include "stdio.h"
#include "iomanip.h"
main()
{
int i,j,in;
char nama[8][30],kelas[8][10];
cout<<"\tData Mahasiswa"<<endl;
puts("--------------------------------------------------");
cout<<"Jumlah mahasiswa = ";cin>>in;
puts("--------------------------------------------------");
cout<<endl;
for(i=0;i<in;i++)
{
cout<<"Data ke - "<<i+1<<endl;
cout<<"Nama : ";gets(nama[i]);
cout<<"Kelas : ";gets(kelas[i]);
}
puts("---------------------------------------------------");
cout<<"Data Tersimpan "<<endl;
for(j=0;j<in;j++)
{
cout<<"Data ke - "<<j+1<<endl;
cout<<"Nama : "<<nama[j]<<endl;
cout<<"Kelas : "<<kelas[j]<<endl;
cout<<endl;
}
getch();
}
No comments:
Post a Comment