C++

Cristian L.

asked • 07/01/21

I am having trouble with a c++ project for the loops part.

this is the project:

The, code must be your OWN. Ask for hints, but write your own code! Reminder all students who copy from each other or get the same code by working together will receive zeroes.

This program will process a user-selected txt file. The only valid file names are input1.txt and input2.txt both of which are automatically included in the Mimir project. The program will provide some interesting statistics about the numbers in that file. The file itself contains a bunch of integers organized into an unknown number of rows with an unknown number of integers per row. *NOTE: Be sure to download the two files above for testing in your CLion project.

Use the output below as a guide for the code you need to write. the [filename] will not show in mimir but will in Clion.

Good input

Enter the name of the file to process: [input1.txt]


Count: 205

Odd: 110

Even: 95

Rows: 22

Average row size: 9

Min: 0

Max: 97

Bad input

Enter the name of the file to process: [name.tst]

File invalid

Submitting

Since I already included the two text files in the Mimir project, you only need to submit your main.cpp file. 40% of your grade is automatically handled by Mimir (test cases). The other 60% will be based on my manual grading. I will be looking for code quality, constants, etc. Remember to check my “Coding Requirements” document in the main menu on Blackboard.

You have unlimited submissions. You may keep uploading your CPP file until you pass all test cases and are happy with your code. I will only grade the last submission. 

Reminder: You must copy the two txt files linked in the previous page to your CLion project’s “cmake-build-debug” folder before testing your program.


1 Expert Answer

By:

Patrick B. answered • 07/01/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.