
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Introduction to Computing for Engineers; Subject: Computer Science; University: Southern Illinois University Edwardsville; Term: Fall 2008;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

This programming assignment requires you to write a program that extensively uses the C++ loop statements. Basically, your program will interactively query the user for integer values and, for each value, output its prime factorization. Recall that a prime number is an integer that cannot be evenly divided by any integer other than itself and 1. Your program will produce prime factorizations according to the following guidelines: The prime factorizations of 0, 1, and -1 are themselves. The prime factorization of a negative number is -1 times the prime factorization of the positive version of that number. The prime factorization of a positive number larger than 1 is the listing of the individual prime numbers which, when multiplied together, produces the positive number in question. A sample interactive session for this assignment is illus- trated at right. Your output is expected to be formatted in an identical fashion to this. Note that your program will require at least three loops: