Marymount University App Development Computer Coding Task

User Generated

Wnfzvar176

Programming

Marymount University

Description

Write a program that calculates and displays all factors of a number with a function. A factor is any number that divides into a number evenly.

For examples: Factors of 20 are 1,2,4,5,10,20

For the program:

  1. Prompt the user for a number or use an input
  2. Call a function to calculate all factors using loops and conditionals and modulus
  3. Display all factors to the page

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Done

Code:





Factors Calculator
Enter a number:
...

Related Tags