Question: hey I need some help with this program im working on in C++ please and hope you will be able to help. 1.2 Finding non-trivial

hey I need some help with this program im working on in C++ please and hope you will be able to help.

hey I need some help with this program im working on in

1.2 Finding non-trivial divisors for a sequence of integers from a file, writing results to another file (3-pt) Write a C++ program to do the following: Read from a text file "input.txt", which has one integer on each line and should assume the values as given in the example below . For each integer, produce all of its divisors other than 1 and itself (they are called non- trivial divisors), separated by a comma If it's prime number, produce the word "ND Be" In the example code on lecture notes, we enumerated all possible values less than the number itself But you only need to reach artinunto find all factors and you should take this approach in this assignment Save the other factors (retinu) in an array Write a rovaro Array) function to reverse the array so factors are in ascending order Write a swapIntint 11. Intk 12 function, which is called by reverseny Output all factors into a separate file, "output.txt", in a format as shown in the example below Example Given the file input.txt The output.txt file should look like the following: What to turn in . Please submit both your source code and the result of its running the screen shot for 1.1 and two text files for 1.2). . Please zip your files and send it as an attachment. But do not send any executables or object files, or your project folder tree, . Make sure that your programs follow all requirements listed above generate output that looks exactly like the example shown have proper exception handling with file I/O . Last but not the least, please do not copy code

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!