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
diamong [38]
3 years ago
6

In a C++ program, one and two are double variables and input values are 10.5 and 30.6. After the statement cin >> one >

> two; executes, ____.
Computers and Technology
1 answer:
SSSSS [86.1K]3 years ago
6 0

Answer:

variable one stores 10.5 and two stores 30.6

Explanation:

In c++ language, the cout keyword is used to write to the standard output. The input from the user is taken by using the cin keyword.

For the input from the user, a variable need is declared first.

datatype variable_name;

The input can be taken one at a time as shown.

cin >> variable_name;

The input for more than one variable can be taken in a single line as given by the syntax below.

1. First, two variables are declared.

datatype variable_name1, variable_name2;

2. Both input is taken simultaneously as shown.

cin >> variable_name1, variable_name2;

For the given scenario, two double variables are declared as below.

double one, two;

The question mentions input values for the two double variables as 10.5 and 30.6.

3. The given scenario takes both the values as input at the same time, in a single line as shown below.

cin >> one >> two;

4. After this statement, both the values entered by the user are accepted.

The values should be separated by space.

First value is stored in the variable one.

Second value is stored in the variable two.

5. The user enters the values as follows.

10.5 30.6

6. The value 10.5 is stored in variable one.

7. The value 30.6 is stored in variable two.

The c++ program to implement the above is given below.

#include <iostream>

using namespace std;

int main() {

   double one, two;      

   cout << " Enter two decimal values " << endl;

   cin >> one >> two;

   cout << " The input values are " << endl;

   cout << " one : " << one << " \t " << " two : " << two << endl;

   return 0;

}

OUTPUT

Enter two decimal values  

10.5 30.6

The input values are  

one : 10    two : 530.6

You might be interested in
What is the name for non-paid active links returned by an Internet search engine in the search results?
otez555 [7]

Answer:

organic links

Explanation:

7 0
3 years ago
Plz plz plz subsribe to my channel, CookieFunTime
Nesterboy [21]

ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok

7 0
3 years ago
Which command would you use to have a workstation stop using an ip address?
Arada [10]
SSH and Telnet!!!! :)
7 0
3 years ago
Discussed the economic and ideological cause of Americans, French and Chinese revolution​
alexgriva [62]

Answer:

The social, political, and economic causes of the American Revolution inevitably helped shape the country we live in today. A social cause that occurred was the disagreement between America and Britain and how poorly they were treated. A political cause that occurred was the implantation of legislatures on the colonies

Explanation:

5 0
3 years ago
Please answer quick! Screenshot included
grigory [225]
The answer is B because of the css is a non smoking area and that cause of smoking kills
5 0
3 years ago
Other questions:
  • How can the connection to salesforce be restricted only to the employee portal server? Universal containers (UC) uses a legacy E
    13·1 answer
  • State one advantage of organising data into columns and rows
    11·1 answer
  • What does limited access to a document mean?
    7·2 answers
  • Write a program that implement a bubble sort ?
    5·1 answer
  • In java, a class that is defined without an explicit extends clause ____.
    15·2 answers
  • Time-management techniques work most effectively when performed in which order?
    7·1 answer
  • ¿Consideran que nuestra sociedad chilena (modelo económico, los medios de comunicación, educación, la publicidad) promueve la sa
    11·1 answer
  • HELP MEEE PLEASE!!!
    11·1 answer
  • Luis saves an attachment that he received from Kevin. Where will the attachment save by default?
    5·1 answer
  • What should you consider when using a wireless keyboard with your home computer
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!