Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

Code Output 1 include 2 include 3 using na... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach to Design Implementation and Management

Authors: Thomas Connolly, Carolyn Begg

6th Edition Global

132943263, 978-0132943260

More Books

Students also viewed these Accounting questions

Question

LO7 What is the purpose of the AMT credit against the regular tax?

Answered: 1 week ago

Question

List and briefly describe five reasons for the study of history.

Answered: 1 week ago

Question

Find an equation of the given line. Slope is -2; x-intercept is -2

Answered: 1 week ago

Question

Compare and contrast the four main deployment models for the cloud.

Answered: 1 week ago

Question

What factors can be used to measure efficiency?

Answered: 1 week ago