Write a program that asks for two integers and writes both the Euclidean division and the real division of the first by the second. For example, for inputs 42 and 5, the program should output: 42=8*5+2 ] 42/5=8.4(remark the vertical bar and the spaces) The prompts must be "Enter the numerator:" and "Enter the denominator :" (Hint: Use float type for decimals)

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 29PE
icon
Related questions
Question
Write a program that asks for two integers and writes both the Euclidean division and the real division of the first by the second. For example, for inputs 42 and 5, the
program should output: 42=8* 5+2 | 42/5=8.4 (remark the vertical bar and the spaces) The prompts must be "Enter the numerator:" and "Enter the
denominator:" (Hint: Use float type for decimals)
Sample output:
Enter the numerator: 42
Enter the denominator : 5
42=8*5+2 | 42/5=8.4
Transcribed Image Text:Write a program that asks for two integers and writes both the Euclidean division and the real division of the first by the second. For example, for inputs 42 and 5, the program should output: 42=8* 5+2 | 42/5=8.4 (remark the vertical bar and the spaces) The prompts must be "Enter the numerator:" and "Enter the denominator:" (Hint: Use float type for decimals) Sample output: Enter the numerator: 42 Enter the denominator : 5 42=8*5+2 | 42/5=8.4
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning