Professional Documents
Culture Documents
C Program
with Sir Beets
Identify the Brand
Type in your answer
Icebreaker
intel Toblerone
Lay’s Adobe
Start
Pseudocode to
X
Flowchart Conversion
ü Composition (Problem 1)
1. Input X Y
2. Input Y
3. S=X+Y
4. Ave = S / 2 S=X+Y
5. Display Ave
• Alternation (Problem 2)
Ave = S / 2
• Iteration (Repeating Statements)
Ave
Stop
1. Open text editor software / C program IDE (e.g. Dev C++)
General Steps
2. Write C program code
in Compiling 3. Save the file in .C format (not .CPP – this is for C++)
and Running C 4. Compile (Locate the compile button)
Programs 5. Run (Locate the run button, the user screen should be visible)
Start
Pseudocode to
Flowchart Conversion X
ü Composition (Problem 1)
ü Alternation (Problem 2)
1. Input X
2. If (X % 2 == 0) Is, false
2.1 Then display “Even” X%2==0
2.2 Else display “Odd” ?
• Iteration (Repeating Statements)
true
“Even” “Odd”
Stop
Start
Pseudocode to
Flowchart Conversion Y=1
ü Composition (Problem 1)
ü Alternation (Problem 2)
ü Iteration (Repeating Statements)
1. Y=1 Is, false
Y <= 6
2. While (Y <= 6)
?
2.1 Display Y
2.2 Y = Y + 1
true
Y=Y+1 Stop
You would need to have
#include <stdio.h>
void main(){
// code inside
}
Output 2
Output 5