Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add code to the main method of your project that does the following: Output a statement that says Hello from [your first and last name].
Add code to the main method of your project that does the following:
Output a statement that says Hello from [your first and last name].
Declare an integer variable num1 and assign it the value 3.
Declare an integer variable num2 and assign it the value 10.
Declare an integer variable sum and assign it the sum of num1 plus num2.
Output the values in this format. Be sure to use the variables, not literals, in your code:
The sum of 3 and 10 is 13.
Declare a double variable value1 and assign it the value 32.4.
Declare a double variable value2 and assign it the value 17.8.
Declare a double variable product and assign it the product of value1 times value2.
Output the values in this format. Be sure to use the variables, not literals, in your code:
The product of 32.4 and 17.8 is xxx.xx
where xxx.xx is the calculated product.
Note that the values should be displayed with 1 place to the right of the decimal, and the product should be displayed with 2 places to the right of the decimal.
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