Question: Write a program that does the following: 1. Declare 3 variables: An int variable qty A double variable price A string variable

Write a program that does the following: 

1. Declare 3 variables: 

• An int variable ‘qty’ 

• A double variable ‘price’ 

• A string variable ‘name’ 

2. Store quantity, price, and name of a product in these variables by assigning literal values to these variables. 

3. The program should display these values on the screen as follows, using a mix of text and the above variables Product Name is the product, its price is $45 You bought 150 quantities.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Code Output 1 include 2 include 3 using na... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!