Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Short Questions: (15 points) Declare a named constant CP which has a value 1.95 x 10-3 Write a selection statement that checks if a variable

Short Questions: (15 points) Declare a named constant CP which has a value 1.95 x 10-3 Write a selection statement that checks if a variable y is between 10 and 100, then display the value of y, otherwise display invalid value. Write an assignment statement to compute the volume of a cone using the following formula: (Assume R, H are known) Also assume is declared as a named constant PI V = 1/3 R^2 H Given a floating point variable as below: float rate = 129/3.762; Write an output statement that will display the value of rate (do not use any number or computation, let the computer do it), with a precision of 2 (i.e. displaying 2 digits after the decimal). Write two ways of putting a comment statement in a program:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions