#include<iostream.h>
#include<stdio.h>
#include<conio.h>
void main()
{
int menu;
float nilai,kh,akt,tgs,uts,uas;
char nama[187],nim[187],ttl[187],jk[187],jr[187],pnddkn[187],sk[187],almt[187];
char lagi;
atas:
clrscr();
cout<<"\n";
cout<<"MENU PROGRAM DATA MAHASISWA"<<endl;
cout<<"1. BIODATA MAHASISWA"<<endl;
cout<<"2. TABEL MATA KULIAH"<<endl;
cout<<"3. PENILAIAN"<<endl;
cout<<"4. CLOSE"<<endl;
cout<<"Masukan MENU yang anda inginkan [1-4]:";
cin>>kategori;
switch(kategori)
{
case 1:
{
cout << "MASUKAN NAMA:";
cin >>nama;
cout << "MASUKAN NIM :";
cin >>nim;
cout << "MASUKAN JENIS KELAMIN:";
cin >>jk;
cout << "TTL:";
cin >>ttl;
cout << "JURUSAN:";
cin >>jr;
cout << "PENDIDIKAN TERAKHIR:";
cin >>pnddkn;
cout << "MASUKAN NAMA SEKOLAH TINGGI:";
cin >>sk;
cout << "ALAMAT:";
cin >>almt;
cout << " -----------BIODATA ANDA-------------\n";
cout << "\njadi nama anda =" <<nama;
cout << "\njadi NIM anda =" <<nim;
cout << "\njadi jenis kelamin anda =" <<jk;
cout << "\njadi TTL anda =" <<ttl;
cout << "\njadi Program studi anda =" <<jr;
cout << "\njadi pendidikan anda =" <<pnddkn;
cout << "\njadi sekolah tinggi anda =" <<sk;
cout << "\njadi alamat anda =" <<almt;
break;
}
case 2:
printf("-------------------------------------------\n");
printf(" TABEL MATA KULIAH\n");
printf("-------------------------------------------\n");
printf("- NO - MATA KULIAH - SKS - RUANG - \n");
printf("-------------------------------------------\n");
printf("- 1 - PEMROGRAMAN DASAR - 1 - 6 - \n");
printf("- 2 - PEMROGRAMAN DASAR - 2 - lab1 - \n");
printf("- 3 - STRUKTUR DATA - 2 - 6 - \n");
printf("-------------------------------------------\n");
break;
case 3:
printf("-------------------------------------------\n");
printf(" PENILAIAN MAHASISWA\n");
printf("-------------------------------------------\n");
printf("Berapa Nilai KEHADIRAN Anda = ");scanf("%f",&kh);
printf("Berapa Nilai KEAKTIVAN Anda = ");scanf("%f",&akt);
printf("Berapa Nilai TUGAS Anda = ");scanf("%f",&tgs);
printf("Berapa Nilai UTS Anda = ");scanf("%f",&uts);
printf("Berapa Nilai UAS Anda = ");scanf("%f",&uas);
nilai=(0.15*kh)+(0.1*akt)+(0.15*tgs)+(0.25*uts)+(0.35*uas);
printf("-------------------------------------------\n");
printf(" NILAI AKHIR ANDA =%.2f",nilai);
printf("-------------------------------------------\n");
break;
case 4:
printf("-------------------------------------------\n");
printf(" DATANG LAGI YA!!!! \n");
printf("-------------------------------------------\n");
break;
default:
cout<<"Kode tidak ada";
}
printf("\n\nIngin ulang Lagi ?? [Y/T] : ");
lagi = getche() ;
if (lagi == 'Y' || lagi == 'y')
goto atas;
}
#include<stdio.h>
#include<conio.h>
void main()
{
int menu;
float nilai,kh,akt,tgs,uts,uas;
char nama[187],nim[187],ttl[187],jk[187],jr[187],pnddkn[187],sk[187],almt[187];
char lagi;
atas:
clrscr();
cout<<"\n";
cout<<"MENU PROGRAM DATA MAHASISWA"<<endl;
cout<<"1. BIODATA MAHASISWA"<<endl;
cout<<"2. TABEL MATA KULIAH"<<endl;
cout<<"3. PENILAIAN"<<endl;
cout<<"4. CLOSE"<<endl;
cout<<"Masukan MENU yang anda inginkan [1-4]:";
cin>>kategori;
switch(kategori)
{
case 1:
{
cout << "MASUKAN NAMA:";
cin >>nama;
cout << "MASUKAN NIM :";
cin >>nim;
cout << "MASUKAN JENIS KELAMIN:";
cin >>jk;
cout << "TTL:";
cin >>ttl;
cout << "JURUSAN:";
cin >>jr;
cout << "PENDIDIKAN TERAKHIR:";
cin >>pnddkn;
cout << "MASUKAN NAMA SEKOLAH TINGGI:";
cin >>sk;
cout << "ALAMAT:";
cin >>almt;
cout << " -----------BIODATA ANDA-------------\n";
cout << "\njadi nama anda =" <<nama;
cout << "\njadi NIM anda =" <<nim;
cout << "\njadi jenis kelamin anda =" <<jk;
cout << "\njadi TTL anda =" <<ttl;
cout << "\njadi Program studi anda =" <<jr;
cout << "\njadi pendidikan anda =" <<pnddkn;
cout << "\njadi sekolah tinggi anda =" <<sk;
cout << "\njadi alamat anda =" <<almt;
break;
}
case 2:
printf("-------------------------------------------\n");
printf(" TABEL MATA KULIAH\n");
printf("-------------------------------------------\n");
printf("- NO - MATA KULIAH - SKS - RUANG - \n");
printf("-------------------------------------------\n");
printf("- 1 - PEMROGRAMAN DASAR - 1 - 6 - \n");
printf("- 2 - PEMROGRAMAN DASAR - 2 - lab1 - \n");
printf("- 3 - STRUKTUR DATA - 2 - 6 - \n");
printf("-------------------------------------------\n");
break;
case 3:
printf("-------------------------------------------\n");
printf(" PENILAIAN MAHASISWA\n");
printf("-------------------------------------------\n");
printf("Berapa Nilai KEHADIRAN Anda = ");scanf("%f",&kh);
printf("Berapa Nilai KEAKTIVAN Anda = ");scanf("%f",&akt);
printf("Berapa Nilai TUGAS Anda = ");scanf("%f",&tgs);
printf("Berapa Nilai UTS Anda = ");scanf("%f",&uts);
printf("Berapa Nilai UAS Anda = ");scanf("%f",&uas);
nilai=(0.15*kh)+(0.1*akt)+(0.15*tgs)+(0.25*uts)+(0.35*uas);
printf("-------------------------------------------\n");
printf(" NILAI AKHIR ANDA =%.2f",nilai);
printf("-------------------------------------------\n");
break;
case 4:
printf("-------------------------------------------\n");
printf(" DATANG LAGI YA!!!! \n");
printf("-------------------------------------------\n");
break;
default:
cout<<"Kode tidak ada";
}
printf("\n\nIngin ulang Lagi ?? [Y/T] : ");
lagi = getche() ;
if (lagi == 'Y' || lagi == 'y')
goto atas;
}
0 comments:
Post a Comment