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
Code Output 1 include 2 include 3 using na... View full answer
Get step-by-step solutions from verified subject matter experts
