Programming
296

contoh coding pemrograman while






  15-Jun-2020 02:38:19



#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;

    }

  }

}


DISCUSSION



16-Jun-2020 12:06:22

Buat apa bro?




Reply


16-Jun-2020 15:20:22



itu looping


Reply

masterku




Reply

Login for comment and discussion.
Login Here
Popular Posts
Gps Tracker Seccodeid Free Too...
Djie sam soe Djie sam soe
General
5066
156
Top

Complete Basic Course in Kali...
Djie sam soe Djie sam soe
Linux
4660
2
Top

Free Proxy List
Sandidi Sandidi
Networking
2838
3
Top

Mass Reverse IP Unlimited
ImamSy ImamSy
Hacking
2068
10
Top

Report McAfee Antivirus Hurrri...
Indrasp Indrasp
Windows
1562
93
Top

Related Post

Subscribe

Subscribe free now for latest posts