+ 2

How to write five times 5 in while loop?

24th Dec 2016, 3:28 PM
Akash Mehra
Akash Mehra - avatar
6 Respostas
+ 5
int x = 0; while (x! = 5) { cout << "five times 5" << endl; x++; }
24th Dec 2016, 3:36 PM
Wen Qin
Wen Qin - avatar
+ 2
int i=0; const int f=5; while (i<5) { cout<<f; i++; }
24th Dec 2016, 3:34 PM
Michael Isac Girardi
Michael Isac Girardi - avatar
+ 1
int x=1; while(x<=5) { cout<<"5"<<endl; x++; }
24th Dec 2016, 6:38 PM
Ghulam Ahmad
Ghulam Ahmad - avatar
+ 1
int n=0; { while(n<5) n++; printf("%d";n); }
26th Dec 2016, 6:17 PM
Zain Rafeeq
Zain Rafeeq - avatar
0
for (int i=0;i <5;i++) cout <<5;
25th Dec 2016, 1:11 PM
Ranjita Goswami
Ranjita Goswami - avatar
0
for next line add printf("\n%d";n);
26th Dec 2016, 6:31 PM
Zain Rafeeq
Zain Rafeeq - avatar