0

Looping

how do I write a program to accept any integer value and output the consecutive 3 integers using a while do loop

17th Jan 2018, 8:01 PM
H4xor
H4xor - avatar
1 Respuesta
+ 4
You don't need a loop to do that, but still if you say so... int start, end; cin>>start; end = start+3; do{ cout<<++start<<endl; }while(start < end);
17th Jan 2018, 8:22 PM
Harjeet Singh
Harjeet Singh - avatar