#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std ;
void ulang ()
{
cout << "tekan ENTER untuk kemabali ";
}
int main ()
{
int pilih;
menubos :
cout <<" pilihan menu ";
cout <<"[1].Baca data ";
cout <<"[2].Ubah data ";
cout <<"[3].Hapus data ";
cout <<"[4].exit ";
cout <<"input pilihan =>";
cin >> pilih ;
system("cls");
while (pilih >= 0)
{
if(pilih == 1)
{
cout <<"anda memilih nomor 1 ";
ulang();
system("pause");
goto menubos;
}
system("cls");
if(pilih == 2)
{
cout <<"anda memilih nomor 2 ";
ulang();
system("pause");
goto menubos;
}
system("cls");
if(pilih == 3)
{
cout <<"anda memilih nomor 3 ";
ulang();
system("pause");
goto menubos;
}
system("cls");
if(pilih == 4)
{
return 0;
}
else
{
goto menubos;
}
}
}
*Beware click the link!
NONE
Buat apa bro?
Reply
itu looping
Reply