Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions

Question

Writing a Strong Introduction

Answered: 1 week ago