0
How to make in one line
6 Respostas
0
Your code doesn't run.
Kindly rectify the errors.
0
There are no errors it works on codeblocks .just not here somehow .migh be cause cin is in a loop and requires input everytime .
0
I wrote output in comments below code. And how i want it to be
0
Yes that is the problem I see, and it is just alignment problem you have I guess.
You can correct it after a couple of trial and error.
0
Yeah alignment is not good cont know how to make it output in one line
0
Do you want something like this:
cout << k << " + "<< sum;
If you initialize k, the code works.