Question: 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
Get step-by-step solutions from verified subject matter experts
