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
Why do analogue signal need to be converted to digital
Paraphin [41]
There are several advantages using digital signal over an analog signal. Digital signals are more secure, and they do not get damaged by noise. They allow the signals transmitted over a lengthy distance. By using these signals, we can translate the messages, audio, video into device language.
8 0
3 years ago
A firewall, when properly implemented, can prevent most attacks on your system.
siniylev [52]
A. it is true
all the best
4 0
3 years ago
Finish the sentence. If the IP address and MAC address are parameters of layer 3 and layer 2, respectively, a port number is a p
stepan [7]

Answer:

Layer 4

Explanation:

MAC address works at the data link layer (layer 2) of the OSI model. Mac address allows computers to uniquely identify themselves in the network

IP Address is a logical address that works at the network layer of OSI model (layer 3) (actually the IP layer of TCP/IP model).

The port number works at the transport layer of the OSI model (layer 4).The port number uses sequence number to send segments to the correct application thereby ensuring they arrive in the correct order.

7 0
3 years ago
So why is there often some Answer Expert Verified that are just 1 star rated or have the wrong answer? Don't quite a few people
miskamm [114]

Answer:

yeah, ive seen them.  I dont trust expert verified answers any more than regular ones.  

Explanation:

5 0
3 years ago
Given the following Python function, find out an asymptotically tight bound of the algorithm in term of n (the input parameter).
alexandr1967 [171]

Answer:

Explanation:

There are two loops in the given code snippet:

1. Both the loops are nested

2. The outer loop which is for loop is running n number of times linearly.

3. The inner loop which is while loop is jumping in the power of 2, which makes it run log n number of times.

So the overall complexity of the code will be= n * log n

Time complexity(or upper bound)= O(n log n).

Hit the thumbs up if you liked the answer. :)

6 0
4 years ago
Other questions:
  • Assume that a gallon of paint covers about 350 square feet of wall space. Create an application with a main() method that prompt
    9·1 answer
  • How do i divid 521 to the nearest tenth
    12·2 answers
  • If you tap or click the increase font size button too many times and make the font size too big, you can tap or click the _____
    9·1 answer
  • Which of the following statements is false? The ARPANET is the precursor to today’s Internet. Today’s fastest Internet speeds ar
    11·1 answer
  • How can your microsoft word processing skills affect overall writing skills on the job?<br><br>​
    7·1 answer
  • A custom information feel that helps users find a specific document is called
    7·1 answer
  • When I click on someone who asked a question and i want to see there answer it is always blurred and when I asked a question I c
    8·1 answer
  • Which of the following is true about named ranges?
    6·1 answer
  • When a person's personal information is collected by other parties, it refers to the issue of
    14·1 answer
  • Write the working principle of a computer and explain it. ​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!