0

Can I remove the space between two lines in c ++?

My code https://code.sololearn.com/cPwzta1yhQr2/?ref=app

17th Jun 2020, 11:22 AM
varun
varun - avatar
8 Answers
+ 2
It looks like this as I ran it ... ***** ***** ***** ***** ***** I don't know if it's possible if you want the stars to appear more condensed (row wise).
17th Jun 2020, 12:46 PM
Ipang
+ 2
You mean like joining a two line string into one? Hello world Into Hello world But the string was separated into lines by new line character '\n' rather than space ' '. So I'm not sure what you want here.
17th Jun 2020, 11:51 AM
Ipang
+ 2
Perhaps check the code for unnecessary `endl` or '\n'? Can you share your code link for better comprehension?
17th Jun 2020, 11:59 AM
Ipang
0
No my mean when I print two stars using cout in two different lines then a huge space between first line and second line I want to remove it. * *
17th Jun 2020, 11:56 AM
varun
varun - avatar
0
Okk
17th Jun 2020, 12:00 PM
varun
varun - avatar
0
#include<iostream> Int main() { int I,j; for(i=1;i<=5;i++) { for(j=1;j<=5;j++) { cout<<"*"; } cout<<endl; } return 0; }
17th Jun 2020, 12:03 PM
varun
varun - avatar
0
In this program when a line end and new line start then a huge space between them due to endl Can I reduce it.
17th Jun 2020, 12:04 PM
varun
varun - avatar