0

Variables

int a = 10; int b = a; cout<<“a+b”<<endl; // displays 20; why does there have to be an ‘endl’ since its a single statement. Is this alternative wrong?[ cout<<“a+b” ; ]

21st Sep 2019, 9:22 PM
Nicholas Amponsah
Nicholas Amponsah - avatar
4 RĂ©ponses
+ 2
Nicholas Amponsah you just need to put the endl if you want the cursor to jump to the next line after printing the result.
21st Sep 2019, 9:53 PM
Ulisses Cruz
Ulisses Cruz - avatar
0
Ulisses Cruz thank you, i do know that. All I wanna know is does this coding necessarily have to be the one above
21st Sep 2019, 10:04 PM
Nicholas Amponsah
Nicholas Amponsah - avatar
0
Hi I wont , JS is fun ,this code
12th Jun 2021, 2:16 AM
Aloka Malinga
- 2
Hello am iranian and my language is parsian
8th Feb 2021, 9:47 PM
Ù…Ű­Ù…ŰŻ Ù…Ű§Ù‡Ű§Ù† ŰȘŰ±Ú©Ù…Ű§Ù†
Ù…Ű­Ù…ŰŻ Ù…Ű§Ù‡Ű§Ù† ŰȘŰ±Ú©Ù…Ű§Ù† - avatar