Professional Documents
Culture Documents
Grade 9 Notes Printed - 19 - 2010 - Algorithms - Practise Questions - Copyright AIS
Grade 9 Notes Printed - 19 - 2010 - Algorithms - Practise Questions - Copyright AIS
II. Programming using input prompts and output messages (Use prompts from this point
onwards):
1. WAP to input ten numbers, calculate and output the total and average of all numbers.
2. WAP to input ten numbers calculate and output the count of negative and count of
positive numbers.
3. WAP to input ten numbers calculate and output the sum of negative and sum of positive
numbers.
4. WAP to input ten numbers calculate and output the count of odd and count of even
numbers.
5. WAP to input ten numbers calculate and output the sum of odd and sum of even
numbers.
6. WAP to input index, name, class, Maths marks of 30 students of a class and output the
count of students that had passed and failed.
7. WAP to input ten numbers, and output the largest and smallest number.
8. A country has four mobile phone network operators. Each mobile phone number has
eight digits. The first three digits identify the network operator:
444 Yodafone
555 N2 network
666 Kofee mobile
777 Satsuma mobile
Write an algorithm, using pseudocode or flowchart only, which reads 50 000 eight-digit
mobile phone calls made during the day and outputs the number of calls made on each
of the four networks. (MJ 2013)
1. WAP using an array to input ten numbers calculate and output the total and average.
Also output all the input numbers.
2. WAP using an array to input ten numbers count and output the count of negative and
count of positive numbers and also output the first five numbers that were input.
3. WAP using an array to input ten numbers calculate and output the sum of negative and
positive numbers and also output the last five numbers that were input.
4. WAP using an array to input ten numbers and output the count of odd and count of
even numbers and also output the input numbers in the even number order of inputs.
5. WAP using an array to input ten numbers calculate and output the sum of odd and even
numbers and also output the input numbers in the odd number order of input.
6. WAP using an array, to input ten numbers and output the smallest and biggest number
and also output all the input numbers in the reverse order.
7. WAP using an array, to input ten numbers and output the smallest and biggest number
and also output the order of the smallest and biggest number in the input sequence.
Example: Smallest is 2 and it is the 5th number
Biggest is 24 and it is the 9th number
8. WAP using an array to input ten numbers and output them in the descending order.
9. WAP using array concept, to input index, name, class, Islam, Dhivehi, English, Maths
marks of 50 students and in the end output only details of those students that have
achieved 50 or above in all four subjects.