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
Use the drop-down menus to complete statements about audio file formats.
Evgesh-ka [11]

Answer: 1. .mp3 2. .aiff 3. .wav

Explanation:

I got it right

8 0
3 years ago
Why will the standard replacement algorithms (LRU, FIFO, clock) not be effective in handling this workload for a page allocation
dusya [7]

Answer:

These algorithm keeps an eye on which page was used when. LRU assumes that the page that was recently used has more probability  

of being used or requested by the user. Thus, it keeps the pages that were recently used, when a new page is requested. If page  

fault occurs, the requested page is fetched and it replaces the page in cache which was last referenced earlier than any other page  

in the cache (or frame).The LRU associates a time with each page in the memory and the ones with the greatest value are replaced.  

It does not suffer from Belady’s anomaly. The page fault will be referred when 512 page frame are reached. This is the total length of the complete sequence.

FIFO replaces pages that come in cache firstly. FIFO stands for First in first out.  

(b) The FIFO replacement algorithm replaces the page which was first brought into the memory followed by the next and soon.  

This algorithm suffers from Belady’s anomaly. In First In First out (FIFO) page replacement scheme of page replacement, the requests  

are executed as they are received. When a new request is made of a page which is not available in the existing frames, then the requested  

page is acquired from the memory. The page in the first frame is replaced by the requested page. If again a request is made of a page not  

yet available in the frames, it is fetched from the memory and it replaces the second frame's page, and so on.  

There are total 500 frames given. The alternative approach which is better than clock algorithm, FIFO, and LRU is that the pages  

from 0 to 498 are set to the fixed frames. Thus, 499 frames are fixed and only one frame can vary.

Explanation:

6 0
3 years ago
select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair
padilas [110]

Rest your fingers gently on the home row or home keys.

Rest your palms on the keyboard.

Relax your fingers.

All the above are proper keyboard techniques apart from slouch in your chair. It is always recommended to sit up straight with your feet positioned on the floor for balance. Do not cross. Center your body to the H key and have your elbows at sides and bent about 90 degrees. Use correct fingering and deploy touch typing. These and many others will help develop optimal speed and accuracy and help prevent the development of stress injury.

6 0
3 years ago
Read 2 more answers
Effective feedback should focus on the behavior, not the person.<br><br> True<br> False
Aleonysh [2.5K]
Your answer is False my fellow samurai
5 0
3 years ago
Read 2 more answers
What commonly predefined alias is configured to run the ls âl command?
coldgirl [10]
<span>The l</span><span>l command is the commonly predefined alias that is configured to run the ls âl command. The command ls stands for list. So instead of writing list, in Linux you only write the command ls.
The alias are </span>shortcuts and time-savers. By typing ll we'll get the current directory's listing, in long format, including hidden directories.


6 0
3 years ago
Other questions:
  • The ________ is(are) used to display information on the computer's screen.
    13·1 answer
  • _____________ is a service that provides access to hardware resources available over the Internet.
    11·1 answer
  • Stefan is finalizing his presentation by adding media files and preparing it for distribution. Stefan knows that saving a presen
    13·1 answer
  • )in the link based implementation of the ADT sorted list what is the worst case time efficiency of the remove method?
    7·1 answer
  • Rint "Censored" if userInput contains the word "darn", else print userInput. End with newline.
    11·1 answer
  • Egyptian hieroglyphs were part of a writing system used by the ancient Egyptians. What type of graphic design elements did they
    13·1 answer
  • Kyle asked his supervisor which type of computing model was used when the enterprise first started. She explained that the organ
    14·1 answer
  • Discuss the pros and cons of tombstoning versus multitasking. Why do you think Microsoft chose tombstoning?
    11·1 answer
  • Which of these is the fastest transmission medium?
    11·2 answers
  • What are some of the characteristics found in an editorial photograph?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!