Professional Documents
Culture Documents
5a 1
5a 1
5a 1
#include <windows.h>
#include <array>
#include <algorithm>
using namespace std;
if (y == 0)
{
prod = nim[x] % 10000;
}
else if (y == 1)
{
prod = sortirnim[x] % 10000;
}
if (j == 0)
{
d = nim[i] % 10000;
}
else if (j == 1)
{
d = sortirnim[i] % 10000;
}
int main()
{
awal:
tampilawal();
tampil:
cout << endl;
cout << "Tampilkan Daftar Mahasiswa [y/t]? "; // konfirmasi proses
cin >> yt;
cout << endl;
if (yt == 'Y' || yt == 'y') {
tampilawal();
cout << " \tNIM\t PRODI JENJANG NAMA " << endl; //
menampilkan data mahasiswa
cout << "----------------------------------------------" << endl;
for (no = 0; no < 12; no++)
{
cout << " " << nim[no] << "\t "; prodi(no, 0);
cout << " "; jenjang(no, 0);
cout << " " << nama[no] << endl;
}
sortir:
cout << endl;
cout << "Sortir Data Mahasiswa [y/t]? "; // konfirmasi sortir data
cin >> yt;
cout << endl;
if (yt == 'Y' || yt == 'y') {
int a, b, c, d = 11, save, sort;
tampilawal();
cout << " \tNIM\t PRODI JENJANG NAMA " << endl; //
menampilkan data mahasiswa setelah disortir
cout << "----------------------------------------------" << endl;
for (no = 0; no < 12; no++)
{
cout << " " << sortirnim[no] << "\t "; prodi(no, 1);
cout << " "; jenjang(no, 1);
cout << " "; namamahasiswa();
cout << endl;
}
}
else if (yt == 'T' || yt == 't') {
goto ulang;
}
else {
goto sortir;
}
}
else if (yt == 'T' || yt == 't') {
goto ulang;
}
else
{
goto tampil;
}
ulang:
cout << endl;
cout << "Apakah Anda Ingin Memasukkan Data Lagi [y/t] ? "; // konfirmasi
pengulangan
cin >> yt;
cout << endl;
if (yt == 'Y' || yt == 'y') {
goto awal;
}
else if (yt == 'T' || yt == 't') {
goto akhir;
}
else {
goto ulang;
}
akhir:
return 0;
}