Looping | Sololearn: Learn to code for FREE!

0

Looping

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

c# c++ c

1/17/2018 8:01:43 PM

H4xor

1 Answer

New Answer

+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);