Our First Program
In this lesson we are going to try and familiarize ourselves with programming... We are going to initiate a couple of commands and finish the program pretty quickly. The first time that i saw this program it absolutely confused me beyond belief. In the Videos that I have included here I am going to seek to explain each and every line of code and break it down so that it hopefully makes sense.
Please keep in mind that the symbols // make anything typed in after it on that line a comment in the program. Comments in programs are notes for the programmers to read that help people understand what is happening in the program. These lines are ignored by the computer.
Please keep in mind that the symbols // make anything typed in after it on that line a comment in the program. Comments in programs are notes for the programmers to read that help people understand what is happening in the program. These lines are ignored by the computer.
The code
using System;
namespace ConsoleApp1
{
class Program
{
static void Main()
{
Console.WriteLine("Hello World!");
}
}
}
namespace ConsoleApp1
{
class Program
{
static void Main()
{
Console.WriteLine("Hello World!");
}
}
}
Videos
The Assignment
Write 2 of the 3 things below into your program to make it different.
1. Add a greeting – let the program welcome you in a warm and pleasant way;
2. Have the computer be rude to the user instead of outputting a greeting
3. Duplicate (or triplicate) the greeting to welcome more than one person;
1. Add a greeting – let the program welcome you in a warm and pleasant way;
2. Have the computer be rude to the user instead of outputting a greeting
3. Duplicate (or triplicate) the greeting to welcome more than one person;