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 Run: Enter an integer: 4 The triple of 4 is 12 The square of 4 is 16 Voila! Enter another integer: 6 (4 + 6) is 10 (4 * 6) is 24 That is all! When you work in Develop mode, remember to place 4 and 6 in separate lines under Enter program input (optional).

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
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.
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!
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Mathematical functions
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education