Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Write short statements for each of the following: (Be to the point, you do not need to write the entire code). (4 x 5

2. Write short statements for each of the following: (Be to the point, you do not need to write the entire code). (4 x 5 = 20 points) a) Declare and initialize a variable (choose your own variable name) to store your favorite flowers name. b) Given an input file named: xydata.txt Write a suitable statement to open this file in C++. c) Given four variables (all floats) a, b, c, d Write a statement that will compute the average of the four variables and store in the variable average. d) Given the following mathematical expression for payment: Where P, R, N are inputs, and assumed they are declared and their values are given. Write this formula in C++ suitably. e) Declare a string variable textbook to store the name of any text book. Then write an input statement to get the name of the text book (remember the text book name may not be one word long).

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

What are some of the tools used to convert data into information?

Answered: 1 week ago