Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Simple C++ [Repeat / Loop]
#1
ada masalah nih di C++ ane gan. dibagian repeat / loop nya tolong di betulkan dong mastah Bingung

Kalo kalimat indo ane ngebingungin, inggrisnya kurang lebih begini :
" Hi, i have a problem with repeat / loop process. There is no action after inputting y / n. Please correct my simple problem. Bingung "

Code C++ :
Code:
#include <iostream> #include <cstdlib> #include <stdlib.h> using namespace std; void wait(unsigned int seconds) { bool stall = true; time_t start, update; start = time(NULL); while(stall) { update = time(NULL); if((update-start > seconds)) stall = false; } } int main() { int x; char ulang; do { x = 10; cout << endl; //Isiannya cout semua :D //Dan pada akhirnya codenya ini = cout << " Ulangi dari awal ? [ Y / N ] ?? "; cin >> ulang; } while((ulang !='Y')&&(ulang !='N')&&(ulang !='y')&&(ulang !='n')); system("cls"); system("pause"); return 0; }

code diatas yang penting penting aja Bahagia
Kalo mungkin mau liat full file cppnya, silahkan komen aja
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple Encryption menggunakan XOR RieqyNS13 3 80 04-24-2012, 04:08 AM
Last Post: spy

Forum Jump:


Users browsing this thread: 2 Guest(s)