Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Algorithm Questions with Answers, Exercises of Algorithms and Programming

Design and expression of algorithms for improving algorithm skills for computer science students

Typology: Exercises

2018/2019

Uploaded on 10/06/2019

huseyinguney
huseyinguney 🇹🇷

3.2

(5)

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Algorithm Questions with Answers
1- Print Hello World 10 Times
Structured English:
BEGIN
Counter EQUAL 0
IF Counter EQUAL or GREATER 10
REPEAT
WRITE “Hello World”
Counter EQUAL Counter PLUS 1
END REPEAT
END IF
END
Pseudocode:
Counter = 0
If (counter<10)
Repeat
Print “Hello World”
Counter = Counter + 1
End Repeat
End If
Flowchart:
pf3
pf4
pf5

Partial preview of the text

Download Algorithm Questions with Answers and more Exercises Algorithms and Programming in PDF only on Docsity!

Algorithm Questions with Answers 1 - Print Hello World 10 Times Structured English: BEGIN Counter EQUAL 0 IF Counter EQUAL or GREATER 10 REPEAT WRITE “Hello World” Counter EQUAL Counter PLUS 1 END REPEAT END IF END Pseudocode: Counter = 0 If (counter<10) Repeat Print “Hello World” Counter = Counter + 1 End Repeat End If Flowchart:

2 - Find the sum of 5 numbers entered by user Structured English: BEGIN Cnt EQUAL 0 Sum EQUAL 0 IF Cnt EQUAL or GREATER 5 REPEAT WRITE “Please Enter 5 Number to Sum up all” GET number Counter EQUAL Counter PLUS 1 Sum EQUAL Sum PLUS Number END REPEAT END IF END Pseudocode:? Flowchart: