Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use C++ Part 4: Little siblings' dividing program Your younger brother and sister are curently learning division in school. Since they keep asking you
Please use C++ Part 4: Little siblings' dividing program Your younger brother and sister are curently learning division in school. Since they keep asking you for help on their homework you have decided to write a computer program that can help them to check their homework Your younger brother is currently in grade school He needs to divide whole numbers and lnow the result and the remainder of the division Your sister is in the next grade up. She alno needs to divide whole numbers, but her teacher wants her to report real-mumber oupur wich four decimal places It is now your job to write one program that will read in rwo mumbers and give the ouiput for both of your siblings (goal: whole mumber division, remaider, and decimal division, comersion between integer and loat data types) Following is an example of the program desige process you should go through Use integer variables for the dividend and divsor, and for brother's resuls and remainder. (Yo' also need a float or a double for sister's results Program design: input variables: integer variables for dividend and divisor o for brother integer variables for quotient and remainde o for sister floating point (use doubles) for quotient Q: what do you need to do to force C++ to do floating point arithmetic if divisor and dividend are integers? Program flow 1. prompt for input values 2. calculate and output brother's math problem (dividend, divisor, quotient, 3. calculate and outpt sister's math problem (dividend, divisor, quotient Additional requirements Name your program grade scbool mathcpp Please indent your program proparly . Please include your names in a comment Once you get that working, add the following . Divisions by zero are a bad thing dd an esxtra y statement to catch the error if they . Hint-is not the same as-= See-Comparison Operators" on p 18, and especially enter a zero as the divisor Pittall: Using-instead of..."on p. 59
Please use C++
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