You are on page 1of 1

GENE 121, Lecture2, Jan 5th, 2011

- Solving problem / computer programs: is a detailed set of instructions that tell a computer what
to do.
- Algorithms : fancy name for programs
- INPUT -> PROGRAM -> OUTPUT
o ex: cooking ( raw material(input), recipe(program), cake(output))
- Executing a program: When a computer runs the program
- In order to execute the program we use a programming language that allows humans to
communicate with the computer.
o A specific syntax is used
- Compiler: converts the programming language into machine code. Ex: visual studio
- Steps to making a program:
o Write a program – code/source code
o Compile program -> from human to coputer
o Run/execute program

Ex program: Say hello

class Hello
{
static void Main( string [] args)
{
System.Console.WriteLine(“Hello, world!”);y
System.Console.WriteLine();
System.Console.WriteLine(“This program produces”);
System.Console.WriteLine(“four lines of output.”);
}
}

Output = Hello, World!

This program produces


Four lines of output.

You might also like