Algorithms – Chapter 4

Introduction Mathematical intuition The logic of everyday life. (Common sense) It is easy to see that some human problems cannot be solved by mathematics. For example compare involvement and its counterpart,“If it rains, I take my umbrella.”“If I don’t take my umbrella, it doesn’t rain”Or the argued conjunction,“I don’t take my umbrella, so it doesn’t …

Read moreAlgorithms – Chapter 4

Algorithms – Chapter 3

The conditions A program does not always run sequentially. Normally it makes a decision at some point to execute only part of itself. Programming languages provide instructions on how to make these choices. Among these instructions we have conditional instructions. Conditional instruction (simple) Alternative (conditional) instruction Flowcharts were one of the important tools for writing …

Read moreAlgorithms – Chapter 3

Algorithms – Chapter 2

Getting started in C Getting started with a program in the C programming language and the different phases of program development. Here is a minimal program in C. Example: The different phases of program development We write/edit the source code with a text editor (such as notepad, emacs ,vi, gedit, kate, etc…) and then the …

Read moreAlgorithms – Chapter 2

Algorithms – Chapter 1

Instead of using a programming language to express an algorithm you can use natural language first (In this case English) and then as a second step use a programming language. But, before starting to study the operations or functions that constitute code perhaps we should recall the definition of an object in general. According to …

Read moreAlgorithms – Chapter 1