Nama Programer : Siti Romlah
Kelas : 1 TI 8
Nrp : 6309037*/
#include
#include
#include
class data{
public:
void input();
void view();
struct data{
char nama[30];
char nrp[50];
char ipk[10];
}mahasiswa[20];
}aa;
int i, j;
void main()
{
int pil;
do
{
clrscr();
cout<<"Program IPK Mahasiswa"<
switch (pil)
{
case 1 : aa.input();break;
case 2 : aa.view();break;
default : clrscr();cout<<"Sampai jumpa lagi...";
}
}while(pil!=3);
getch();
}
void data::input()
{
clrscr();
cout<<"Masukkan Jumlah Mahasiswa Yang Akan Diinputkan: ";cin>>j;
clrscr();
for (i=1;i<=j;i++)
{
cout<<"Nama Depan Ke-"< cout<<"NRP Mahasiswa Ke-"< cout<<"IPK Mahasiswa Ke-"< cout<
cout<<"Press any key to continue..";
getch();
}
void data::view()
{
clrscr();
int x,y;
gotoxy(19, 2);cout<<"Tabel IPK Mahasiswa"<
gotoxy(8, 4);cout<<"º No. º NRP º Nama º IPK º\n";
gotoxy(8, 5);cout<<"ÌÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍ͹\n";
gotoxy(8, 6);cout<<"º º º º º\n";
gotoxy(8, 7);cout<<"º º º º º\n";
gotoxy(8, 8);cout<<"º º º º º\n";
gotoxy(8, 9);cout<<"º º º º º\n";
gotoxy(8,10);cout<<"º º º º º\n";
gotoxy(8,11);cout<<"º º º º º\n";
gotoxy(8,12);cout<<"º º º º º\n";
gotoxy(8,13);cout<<"º º º º º\n";
gotoxy(8,14);cout<<"º º º º º\n";
gotoxy(8,15);cout<<"º º º º º\n";
gotoxy(8,16);cout<<"º º º º º\n";
gotoxy(8,17);cout<<"º º º º º\n";
gotoxy(8,18);cout<<"ÈÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍͼ\n";
for (x=1;x<=4;x++)
for (y=1;y<=j;y++)
{
gotoxy(x*10+1,y+5);
{
if(x==1) cout<
}
gotoxy(1,25); cout<<"Press any key to continue..";
getch();
}
Tidak ada komentar:
Posting Komentar