0

how writing program in a new line how

25th Jun 2016, 6:32 AM
Abdelrhmanalbashir
Abdelrhmanalbashir - avatar
14 Antworten
+ 2
two ways.... #include <iostream> using namespace std; int main () { cout<<"line 1"<<endl; cout<<"endl means newline \n"; cout<<"the (slash) n is also newline..."; return 0; } you can successively add '\n' but you have to use '<<' before putting another 'endl'
25th Jun 2016, 1:21 PM
Mukul Kumar
Mukul Kumar - avatar
+ 1
using new line. <<endl;
25th Jun 2016, 7:17 AM
Francisco II S. Caminero
Francisco II S. Caminero - avatar
+ 1
thanks can you write it in a program
25th Jun 2016, 7:53 AM
Abdelrhmanalbashir
Abdelrhmanalbashir - avatar
+ 1
#include <iostream> using namespace std; int main() { cout << "Hello world! \n\n"; cout << "I love programming!"; return 0; }
25th Jun 2016, 8:16 AM
Francisco II S. Caminero
Francisco II S. Caminero - avatar
+ 1
thanks #franx camz
25th Jun 2016, 8:49 AM
Abdelrhmanalbashir
Abdelrhmanalbashir - avatar
+ 1
by endl
28th Jun 2016, 9:47 AM
Manav Billimoria
Manav Billimoria - avatar
+ 1
\n ok
30th Jun 2016, 5:49 AM
محمد جو حال
محمد جو حال - avatar
+ 1
Endl or \n
1st Jul 2016, 4:13 PM
Sagar Thorat
Sagar Thorat - avatar
+ 1
\n
6th Jul 2016, 2:40 PM
ajay73644
ajay73644 - avatar
+ 1
\n or endl
6th Jul 2016, 4:10 PM
uday
uday - avatar
+ 1
\n "
8th Jul 2016, 3:09 PM
Gurwinder Singh
Gurwinder Singh - avatar
+ 1
\n or endl either works
10th Jul 2016, 4:40 AM
Jamal Latif
Jamal Latif - avatar
+ 1
by endl
10th Jul 2016, 5:51 AM
Thejus
0
or \n
25th Jun 2016, 7:29 AM
Rick Yuzuriha
Rick Yuzuriha - avatar