1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vova2212 [387]
3 years ago
9

Consider the following program segment: //include statement(s) //using namespace statement int main() { //variable declaration /

/executable statements //return statement }
a) Write C11 statements that include the header files iostream and string.
b) Write a C11 statement that allows you to use cin, cout, and endl without the prefix std::.
c) Write C11 statements that declare the following variables: name of type string and studyHours of type double.
d) Write C11 statements that prompt and input a string into name and a double value into studyHours.
Computers and Technology
1 answer:
nordsb [41]3 years ago
4 0

Answer:

a. Write C++ statements that include the header files iostream and string.

#include <iostream>

#include <string>

b. Write a C++ statement that allows you to use cin, cout, and endl without the prefix std::.

To use cin and cout, one must first declare at least one variable. At this point, I'll assume that the variable has been declared already I'll name my variable "test" without the quotes.

cin>>test;

cout<<test<<endl;

c. Write C++ statements that declare the following variables: name of type string and studyHours of type double.

string name;

double studyHours;

d. Write C++ statements that prompt and input a string into name and a double value into studyHours.

string name;

double studyHours;

cout>>"What's your name?";

cin<<name;

cout<<"What's your study hours?";

cin>> studyHours;

PS: A full program in C++ that illustrates the above

#include <iostream>

#include <string>

using namespace std

int main()

{

string name;

double studyHours;

cout>>"What's your name?";

cin<<name;

cout<<"What's your study hours?";

cin>> studyHours;

cout<<"Hello "<<name<<", your study hour is "<<studyHours;

return 0;

}

You might be interested in
If there is a mistake with one of your bank accounts, who should you contact to resolve the issue
Reika [66]

Answer:

I would advise calling the bank as they are the probably the most likely to be able to resolve the issue .

6 0
3 years ago
Important tools used in the _____ phase of the DMAIC process include a project charter, a description of customer requirements,
pishuonlain [190]

Answer:

d. define

Explanation:

DMAIC is an acronym for Define, Measure, Analyze, Improve and Control is a data-driven improvement cycle used for improving processes and driving Six Sigma projects.

Important tools used in the define phase of the Define, Measure, Analyze, Improve, and Control (DMAIC) process include;

- A project charter.

- A description of customer requirements.

- Process maps.

- Voice of the Customer (VOC) data.

5 0
3 years ago
Which one of the following oscilloscope controls is used to move the trace up and down the screen vertically
kakasveta [241]
B. is the answer to this question
3 0
3 years ago
Variables make it easier to do what?
defon
<span>D. Make changes to your code
Variables allow the ability to easily substitute numbers for other numbers.
</span>
8 0
3 years ago
What is the effect of this line of CSS code?
Semenov [28]
The correct answer is C
6 0
3 years ago
Other questions:
  • What was the attitude of the U.S. Senate towards the Treaty of Versailles, and why did they have that attitude?​
    9·1 answer
  • Explain the use of keyboard shortcuts and key combinations. You are at the tenth page of a 20-page document. You need to make ch
    14·1 answer
  • Write a program with a method computeCommission which takes a double that is the salesAmount and returns the commissions for sal
    9·1 answer
  • Gary has to complete a form before enrolling into an online course. A few of the fields require Gary to respond with either a "Y
    7·2 answers
  • The CMOS battery located on a computer's motherboard allows for maintaining the correct time and date information stored in CMOS
    7·1 answer
  • What games do you play?<br><br><br> Be sure not to report any answers!
    5·1 answer
  • 2. The Internet could best be described as: *
    12·1 answer
  • Today, scientists agree that good research is ethical in nature and is guided by basic respect for human dignity and safety. How
    6·1 answer
  • Explain the characteristics of a first generation computer​
    8·1 answer
  • Write a program using for loop to find the cube of numbers from 50-100 <br> FASTT
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!