0

Write a program Using do-whileloop to display number 2,4,6,8,10,12,14,16,18,20.

22nd Oct 2016, 6:25 AM
Debojyoti Dey
Debojyoti Dey - avatar
3 Respuestas
- 1
#include <iostream> using namespace std; int main() { int a(2); do { cout << a << endl; a+=2; } while(a <= 20); return 0; }
22nd Oct 2016, 6:33 AM
Geoffrey
Geoffrey - avatar
- 1
tnx bro
22nd Oct 2016, 6:35 AM
Debojyoti Dey
Debojyoti Dey - avatar
- 1
#include <iostream> using namespace std; int main() { int a=0; do{ a = a + 2; cout << a << endl; } while (a < 20); return 0; }
23rd Oct 2016, 8:35 AM
Emon
Emon - avatar