+ 3
What is different between Console.WriteLine() and Console.Write()
Rt
6 Respostas
+ 14
example:
console.writeline("HELLO WORLD");
console.writeline("Love C#");
output:
HELLO WORLD
Love C#
------------------------------
console.write("Hello world");
console.write("Love C#");
output:
Hello worldLove C#
------------------------------
Summery:
WriteLine add a new line in the end of sentances.
Write doesnt add line at end of the santances.
hope that helped
+ 2
Console.WriteLine() wrote all in the (" ") in one line and then get you on new line.
Console.Write() only wrote all in the (" ") and keep you on the same line.
+ 2
Console.Write() will print the output and stay on the same line.
Console.WriteLine() will print the output and then go to a new line.
Example:
Console.Write("Hello");
Console.Write("Jim");
OUTPUT:
HelloJim
-------------------------------------
Console.WriteLine("Hello");
Console.WriteLine("Jim");
OUTPUT:
Hello
Jim
+ 1
console.writeline prints something then goes one line down. While console.write keeps you at the same line
0
WriteLine() creates a new line after output, Write() does not.
- 2
write a program of 2 variable