Question: part A; Write a program that - outputs the sum and the product of all integers from 1 up to user input. - For example:

 part A; Write a program that - outputs the sum and

part A; Write a program that - outputs the sum and the product of all integers from 1 up to user input. - For example: If a user enters 4 , output would be: - The sum is: 10 The product is: 24 Part B; Write a program to test whether a number is a prime number. - (Hint: A prime number is not divisible by any number except 1 and itself, so you can use a counter starting from 2 and up to 'input number minus 1', and test each counter number against the input number)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!