Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need this in java please Assignment 2A: Remainder Across Operations. We've learned that in programming, there is a special operator for getting the whole number
need this in java please
Assignment 2A: Remainder Across Operations. We've learned that in programming, there is a special operator for getting the whole number remainder of division: The Modulo Operator! There are many uses for this operator which we will learn throughout the semester. In this assignment, we will use it to figure out the remainder of two numbers after adding, subtracting, multiplying, and dividing them. The basic steps are as follows: a) Ask the user to enter two numbers (as integers) b) Read those values in c) Create four variables - one for the sum, difference, product, and quotient Note: You must use integer division for the quotient. d) Calculate those four values e) Ask the user for the number they want to use to find the remainder f) Read that value in as well g) Use the Modulo Operator find out the remainder for the four mathematical operations h) Display the relevant information to the user The algorithm output is as shown below, with user input in bold. Follow the output format exactly. Save your source code in a file called Assignment2A (with a file extension of .cpp, .cs or .java) Sample Output: First number: 20 Second Number: 7 Number for Modulo Operation: 5 20+7=27. The remainder if divided by 5 is 2 . 207=13. The remainder if divided by 5 is 3 . 207=140. The remainder if divided by 5 is 0 . 20/7=2 (Approximately). The remainder if divided by 5 is 2 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