CoboCards App FAQ & Wishes Feedback
Language: English Language
Sign up for free  Login

This flashcard is just one of a free flashcard set. See all flashcards!

All main topics / Education / Education / Education
2730
Write a program that generates all the factors
Just Click on Below Link To Download This Course:

https://www.devrycourses.com/product/devry-comp-122-week-3-ilab-latest/

Week 3 iLab
Complete the following two programs:
Programming Problem 1
Write a program that generates all the factors of a number entered by the user. For instance, the number 12 has the factors 2 * 2 * 3. This program has the following requirements:
1.A.The user must enter a positive integer.If the user enters something else, your program should output an error message and let the user enter a new value. Use a do/while loop to make sure the user input is successful.
2.B.The factors must be output in increasing order.The lowest factor your program should report is 2.
3.C.Your program should output 4 factors per line, each factor in a field of 10 characters.(Hint: the number of factors output determines when to output endl!)
Tags: DEVRY COMP 122 WEEK 3, DEVRY COMP 122 WEEK 3 ILAB LATEST
Source: https://www.devrycourses.com/product/devry-comp-122-week-3-ilab-latest/
New comment
Flashcard info:
Author: CoboCards-User
Main topic: Education
Topic: Education
School / Univ.: devry university
City: UK
Published: 12.02.2020

Cancel
Email

Password

Login    

Forgot password?
Deutsch  English