Senin, 24 Mei 2010

Program Class

#include "iostream.h"
#include "conio.h"

class mahasiswa
{
public :
char nama[20];
int nrp;
char kons[10];
char gender[10];
}data[30];

void main()
{
clrscr();
int n;
cout<<"Berapa Data Mahasiswa yang ingin anda inputkan : ";
cin>>n;
clrscr();

gotoxy(22,2);
cout<<"-----------INPUT-----------\n";
cout<gotoxy(24,4);
cout<<" Masukan Data Diri Anda \n";
gotoxy(24,5);
cout<<"------------------------ \n";

gotoxy(8,6);
cout<<"ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß";
gotoxy(8,7);
cout<<"ß ß ß ß ß ß";
gotoxy(8,8);
cout<<"ß NO ß NAMA ß NRP ß KONSENTRASI ß GENDER ß";
gotoxy(8,9);
cout<<"ß ß ß ß ß ß";
gotoxy(8,10);
cout<<"ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß";

for(int a=1;a<=n;a++)
{
gotoxy(8,10+a);
cout<<"ß ß ß ß ß ß";
gotoxy(8,11+a);
cout<<"ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß";
gotoxy(10,10+a);
cout<gotoxy(15,10+a);
cin>>data[a].nama;
gotoxy(32,10+a);
cin>>data[a].nrp;
gotoxy(42,10+a);
cin>>data[a].kons;
gotoxy(57,10+a);
cin>>data[a].gender;
}

clrscr();
gotoxy(22,2);
cout<<"-----------Output-----------\n";
cout<
for(int b=1;b<=n;b++)
{
gotoxy(9,6);
cout<<"ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß";
gotoxy(9,7);
cout<<"ß ß ß ß ß ß";
gotoxy(9,8);
cout<<"ß NO ß NAMA ß NRP ß KONSENTRASI ß GENDER ß";
gotoxy(9,9);
cout<<"ß ß ß ß ß ß";
gotoxy(9,10);
cout<<"ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß";
gotoxy(9,10+b);
cout<<"ß "<gotoxy(14,10+b);
cout<<"ß "<gotoxy(31,10+b);
cout<<"ß "<gotoxy(41,10+b);
cout<<"ß "<gotoxy(57,10+b);
cout<<"ß "<cout<}
cout<<"\tßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß";
getch();
}


TECOM-C..???
Siaaaap..!

0 komentar:

Posting Komentar