-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
whiledo.cpp
41 lines (36 loc) · 885 Bytes
/
whiledo.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <iostream>
#include <string>
#include <windows.h>
using namespace std;
void gotoyx(int x, int y)
{
COORD c = { x, y};
SetConsoleCursorPosition( GetStdHandle(STD_OUTPUT_HANDLE), c);
}
int main()
{
string namayogi;
int nimyo, nilaiyog;
char traegen;
do
{
cout <<"++++++++++++++++++++++++++++++" <<endl;
cout <<" Progam Data Mahasiswa " <<endl;
cout <<"++++++++++++++++++++++++++++++" <<endl;
cout <<"Masukan Nama : ";
getline(cin,namayogi);
cout <<"Masukan Nim : " ;
cin >>nimyo ;
cout <<"Masukan Nilai : " ;
cin >>nilaiyog;
cout <<"++++++DATA MAHASISWA+++++++" << endl;
cout <<"Nama : " <<namayogi <<endl;
cout <<"Nim : " <<nimyo <<endl;
cout <<"Nilai : " <<nilaiyog <<endl;
cout <<"input data lagi 'y' untuk exit 'n' = ";
cin >> traegen;
}
while (traegen=='y');
gotoyx(50,24);
cout <<" Thanks for using Program GNU/GPL " <<endl;
}