Introduction To C
Introduction To C
C#
Coders use outputs all the time to check that the computer is
following the given instruction and fix problems with code. The
following line of code displays a message on the screen as an
output
The Code
Console.WriteLine();
Used to display something in the console.
Console.WriteLine(“Hello World”);
The Code
Console.Write();
Used to display something in the console on the same line.
Console.Write(“Hello”);
Console.Write(“I am Batman”);
Variables
You cannot use any special characters other than underscore (_).
You cannot use whitespaces.
You cannot use number alone.
You cannot use numbers to be the first character of the identifier.
You can use numbers but with letters.
Declaring variables.
Syntax
datatype identifier;
datatype identifier = value;
datatype identifier1, identifier2,
datatype identifier1 = value; identifier2 = value;
Concatenation
Console.WriteLine(“Hello!I’m “ + Name);
Sentence Builder Challenge