Looping | Sololearn: Learn to code for FREE!



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


1 Answer

New Answer


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