Skip to content
MathsGenie logo
Open app

Course home

  1. IGCSE
  2. Computer Science Edexcel
  3. Question bank

Develop code

EasyMediumHard
123456789101112131415161718192021222324252627
Question 4

Write a program to display the double (multiplied by 2) and the half (divided by 2) of an integer between 10 and 100 inclusive entered by the user.

The program must:

  • Prompt the user to enter an integer between 10 and 100 inclusive.
  • Keep asking for a number and performing the calculation until a number outside the range 10 to 100 is entered.
  • For each valid number entered, calculate and display the original number, its double, and its half, with appropriate descriptive labels.
[6]

Develop code Questions

  1. IGCSE
  2. /Computer Science
  3. /Develop code