Science · Paper 2 · 2014
3 questions 🇹🇿 NECTA ✓ MS3-hour timed simulation · auto-graded · counts toward ranking
Pay & start exam →Questions (3)
Section A
Write a C++ program that prompts the user to select either Arithmetic Progression (AP) or Geometric Progression (GP) to generate and display the sum of terms. The program should request the user to enter first term, number of terms, common ratio or common difference depending on the user’s selection. Create a C++ program which prompts the user to enter 20 numbers and the program should count and print the number of zero, odd and even numbers entered.
- Write a C++ program that prompts the user to select either Arithmetic Progression (AP) or Geometric Progression (GP) to generate and display the sum of terms. The program should request the user to enter first term, number of terms, common ratio or common difference depending on the user’s selection. (0 mk)
- Create a C++ program which prompts the user to enter 20 numbers and the program should count and print the number of zero, odd and even numbers entered. (0 mk)
Upgrade to see model answers.
Section C
Use HTML codes to create a given webpage with the specified page descriptions. Create a simple watch by using JavaScript and HTML codes which can help the user to check for the current date and time after clicking button “Date”. Additionally, the user should use it as a stop watch after clicking the button “Stop watch”.
- Use HTML codes to create a given webpage with the specified page descriptions. (0 mk)
- Create a simple watch by using JavaScript and HTML codes which can help the user to check for the current date and time after clicking button “Date”. Additionally, the user should use it as a stop watch after clicking the button “Stop watch”. (0 mk)
Upgrade to see model answers.