1 Introduction
1 Introduction
0107200
Introduction and Development Environment Setup
College of Engineering
Department of Computer and Communications Engineering
Concept of programming
Computer programming is important today because so much of our
world is automated. Humans need to be able to control the
interaction between people and machines. Since computers and
machines are able to do things so efficiently and accurately, we
use computer programming to harness that computing power.
Computer programs are collections of instructions that tell a
computer how to interact with the user, interact with the computer
hardware and process data.
Algorithm: is a step by step plan to solve a problem, or a detailed
set of steps we followed to solve a particular problem. It is a recipe
to do something.
Programming process
Example
Find x y
First step:
We might try x = 3 and y = 4, getting an answer of 34 = 81.
Second step:
Write down what you just did.
The algorithm is:
Multiply 3 by 3
You get 9
Multiply 9 by 3
You get 27
Multiply 27 by 3
You get 81
81 is the answer
Third step:
Generalize Your Steps.
First attempt. Replace 3 by x.
Multiply x by 3
You get 9
Multiply x by 3
You get 27
Multiply x by 3
You get 81
81 is the answer
Look for a repetition pattern and the number of times it repeats.
Third step:
Second attempt: generalize how many times to do the steps, as well
as what the steps are.
Start with n = 3
n = Multiply x by n
n = Multiply x by n
n = Multiply x by n
n is the answer
The steps are repeated y-1 times (x times)
Start with n = 3
Count from 1 to y-1 (inclusive), for each number you count:
n = Multiply x by n
n is the answer
substitute 3 by x
Start with n = x
Count from 1 to y-1 (inclusive), for each number you count:
n = Multiply x by n
n is the answer
Development environment
For windows platform go to ”https://visualstudio.microsoft.com/”
Download the latest Community release of visual studio.
Run the downloaded file and follow the instructions to complete the
installation