Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question

Java Program:

Your job is to write a program called BasicIO that will perform simple input/output and math operations. Complete your program by following the steps below. 

Step 2
Once you have Step 1 working properly, extend your program's capability by adding several lines that prompt the user for a second number
and then prints the sum and product of the two numbers that were entered as shown in the sample below.
Sample run
Input:
4
6
Run:
Enter an integer: 4
The triple of 4 is 12
The square of 4 is 16
Voila!
Enter another integer: 6
is 10
(4 + 6)
(4 *
6) is .
That is all!
When you work in Develop mode, remember to place 4 and 6 in separate lines under Enter program input (optional).
Notes
Make sure to use a println Statement to print the last line of the output.
expand button
Transcribed Image Text:Step 2 Once you have Step 1 working properly, extend your program's capability by adding several lines that prompt the user for a second number and then prints the sum and product of the two numbers that were entered as shown in the sample below. Sample run Input: 4 6 Run: Enter an integer: 4 The triple of 4 is 12 The square of 4 is 16 Voila! Enter another integer: 6 is 10 (4 + 6) (4 * 6) is . That is all! When you work in Develop mode, remember to place 4 and 6 in separate lines under Enter program input (optional). Notes Make sure to use a println Statement to print the last line of the output.
Step 1
First, prompt the user to enter an integer value as shown below. Be sure you clearly understand which part of the sample run below is
generated by the computer versus which is just input typed in the by the user. Your program should then print the value tripled as well as
the value squared as shown below. You can simply compute the square by multiplying the value input by itself.
Sample run
Input:
4
Run:
The triple of 4 is 12
The square of 4 is 16
Voila!
When you work in Develop mode, remember to place 4 under Enter program input (optional). Since the output will not contain the user
input part of the run (i.e., the user typing 4 and pressing the Enter key), the result of the execution of the program should look like the
following:
Enter an integer: The triple of 4 is 12
The square of 4 is 16
Voila!
expand button
Transcribed Image Text:Step 1 First, prompt the user to enter an integer value as shown below. Be sure you clearly understand which part of the sample run below is generated by the computer versus which is just input typed in the by the user. Your program should then print the value tripled as well as the value squared as shown below. You can simply compute the square by multiplying the value input by itself. Sample run Input: 4 Run: The triple of 4 is 12 The square of 4 is 16 Voila! When you work in Develop mode, remember to place 4 under Enter program input (optional). Since the output will not contain the user input part of the run (i.e., the user typing 4 and pressing the Enter key), the result of the execution of the program should look like the following: Enter an integer: The triple of 4 is 12 The square of 4 is 16 Voila!
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education