A while ciklus bemutatása egy apró példával C++ nyelven
Forráskód:
#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
cout<<"?";
int d;
cin>>d;
while(d<10){
cout<<"Hajra Arsenal!\n";
d++;
}
return 0;
}
Videó: