HN-Community
Help Simple C++ [Repeat / Loop] - Printable Version

+- HN-Community (https://hacker-newbie.org)
+-- Forum: Miscellaneous (https://hacker-newbie.org/forum-86.html)
+--- Forum: Coding/Programing (https://hacker-newbie.org/forum-19.html)
+---- Forum: C & C++ (https://hacker-newbie.org/forum-77.html)
+---- Thread: Help Simple C++ [Repeat / Loop] (/thread-18771.html)



Help Simple C++ [Repeat / Loop] - bloodybomber - 12-24-2013

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