Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help with this. Modify the program Figure 2.6 (exam1/exam2). Ask the user to enter two numbers Find the result when the first number is
Please help with this.
Modify the program Figure 2.6 (exam1/exam2). Ask the user to enter two numbers Find the result when the first number is divided by the second Also find the remainder when the first number is divided by the second In other words, the program used to do this: 68 85 score = 81 Now it should do this 22 2 Divide = 11 Remainder = 0 If you run it again: 11 2 Divide = 5 Remainder = 1 If you run it again: 20 16 Divide = 1 Remainder = 4 Use integer arithmetic only. NO DECIMAL POINTS.
This is my code
#include
int main(int argc, char** argv) { const int bonus = 10; int exam1; int exam2; int score; scanf("%d%d", &exam1, &exam2); score = (exam1 + exam2) / 2 + bonus; printf("score - %d ", score);
return (0); }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started