Please help me with these questions. I am having trouble understanding what to do Programming Language: (HTML, CSS, JavaScript) Please provide preconditions and postconditions for each solution you provide. IMPORTANT: In Ex 9 and 10, you are not allowed to use strings. Instead, you should work with numbers and mathematical operators, such as division, remainder, etc. Ex 9) Devise a flowchart to receive a positive number and output how many of its digits are equal to 5. For instance, if the input is 5155, the program should output 3, because there are three fives there. Another example, if the input is 14368, the program should output 0. Ex 10) Devise a flowchart to receive a positive number and output the product of its final five digits (or its final digits, if they all number less than five). For instance, if the input is 12811, the program should output 16, because 1*1*8*2*1 is 16. Another example, if the input is 23 the program should output 6. However, if the input is 712811 the program should output 16, as the first digit will be ignored.
Please help me with these questions. I am having trouble understanding what to do
Please provide preconditions and postconditions for each solution you provide.
IMPORTANT: In Ex 9 and 10, you are not allowed to use strings. Instead, you should work with numbers and mathematical operators, such as division, remainder, etc.
Ex 9) Devise a flowchart to receive a positive number and output how many of its digits are equal to 5. For instance, if the input is 5155, the program should output 3, because there are three fives there. Another example, if the input is 14368, the program should output 0.
Ex 10) Devise a flowchart to receive a positive number and output the product of its final five digits (or its final digits, if they all number less than five). For instance, if the input is 12811, the program should output 16, because 1*1*8*2*1 is 16. Another example, if the input is 23 the program should output 6. However, if the input is 712811 the program should output 16, as the first digit will be ignored.
Step by step
Solved in 4 steps with 2 images