Select Page

COSC 1436 Exercise Problems

Purpose: To familiarize yourself with variables and arithmetic and the process of completing and submitting a lab assignment.

Directions: Convert the following problems below to c++ equivalent code. The first one will be done for you by the instructor (and is available in eCampus as an example). Each problem should be done within the same file and all within the same main function. After each step is performed the user should be shown the updated value that was changed (in other words, display the newly updated value after every numbered step see problem 0 as an example). Turn in the finished c++ (
.cpp) file through eCampus (2 files in total, both within the same submission – yes you are allowed to submit more than 1 file per submission). Remember to reset or use unique variables for each problem (you cannot declare a variable by the same name twice). In each problem the user will enter a number(s) on the first step only – do not hard code values for the input to any of the problems. If you have questions, ask your instructor: by email or during live sessions I will be glad to help you.

Cheating: This is an individual assignment. You may use materials from your coursebook, notes, or video lectures but not from others and not from websites like coursehero.com or chegg.com. These and others like it are websites where students can post assignments and have others solve them for you. However, if you are copying the solution from there then other students are doing it as well making it look as though you cheated off the other student (plus it is usually obvious the difference between a professional from one of sites doing the lab versus a student). If you resort to downloading your code or otherwise copying your program from someone else, you will receive a zero on the assignment. Instead, ask me. I will be happy to help with any of your problems on this or any of the other assignments. Send me an email,

Problem 0:
(This is named problem zero because it is done for you, see eCampus for the code and an example of how to complete the rest of the problems.)
1. Take as input any number that the user enters (cin >> varname)
2. Multiply the number by 2
3. Add 10 to the number
4. Divide the number by 2
5. Subtract 5 from the number
6. The result should be the original number (if not then we did something wrong)
Problem 1:
1. Take any number the user enters
2. Add 3 to the number
3. Multiply the number by 2
4. Subtract 6 from the number
5. Divide by 2
6. The result should be the original number
Problem 2:
1. Enter a random number
2. Store the input number for later use (as another variable)
3. Multiply the number by 5
4. Add 45 to the number
5. Multiply the number by 2
6. Divide the number by 10
7. Subtract the original number from your previ

#### Why Choose Us

• 100% non-plagiarized Papers
• Affordable Prices
• Any Paper, Urgency, and Subject
• Will complete your papers in 6 hours
• On-time Delivery
• Money-back and Privacy guarantees
• Unlimited Amendments upon request
• Satisfaction guarantee

#### How it Works

• Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
• Fill in your paper’s requirements in the "PAPER DETAILS" section.