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
Vesna [10]
3 years ago
13

Use an ifstream object named indata to read the first three integers from a file called lottowins and write each number to stand

ard output, on a line by itself. Assume that an ifstream object named indata has already been declared. Write code that uses the indata object to open a file named "lottowins". Then, read the first three integers from the file and write each number to standard output, on a line by itself. Last, close the file.
Computers and Technology
1 answer:
Gemiola [76]3 years ago
4 0

Answer:

int x;

indata.open("lottowins");

indata >> x;

cout << x << endl;

indata >> x;

cout << x << endl;

indata >> x;

cout << x << endl;

indata.close();

You might be interested in
Which feature of a website takes you to a different part of the website or a totally different website when you click on it?
lesantik [10]

A hyperlink is a feature that takes you to a different page when you click on it. That page could be part of the same website or a totally different website.

Let me know if you have any questions.

3 0
3 years ago
Read 2 more answers
Data with values that change continuously or smoothly over time is known as:
Alexeev081 [22]

Answer:

A.  \:  \boxed{analog  \: data}

5 0
3 years ago
Read 2 more answers
Consider the following code: <br> x=9 y = -2 z=2<br> print (x + y * z)<br> What is output?
Goryan [66]

Answer:

14

Explanation: The reason why is because adding a negative is pretty much subtracting by 2. 9-2=7. Then multiply 7 by 2 like add 7 to 7 and you get 14.

3 0
3 years ago
Suppose variables roll1 = 3 and roll2 = 4, which of the following will be evaluated as true?
Y_Kistochka [10]

Answer:

The correct answer for the given question is "  roll1>3 || roll2 > 3  "

Explanation:

In option A, there are two conditions separated by OR. In OR, if any condition  is true then it will return TRUE. There second condition is TRUE in the statement  that is why the whole expression return TRUE.

Thats why the correct answer is "roll1>3 || roll2 > 3".

5 0
3 years ago
The function below takes two arguments: a dictionary of strings (keys) to integers (values) a_dict and a list of strings key_lis
vitfil [10]

Answer:

  1. def getData(a_dict, key_list):
  2.    result = []
  3.    for key in key_list:
  4.        result.append(a_dict[key])
  5.    
  6.    return result  
  7. result = getData( {"puffin": 5, "corgi": 2, "three": 3} , ["three", "corgi"])
  8. print(result)

Explanation:

Let's define a function <em>getData() </em>with two parameters,<em> a_dict </em>and <em>key_list</em> as required by the question (Line 1).

Since the function is to return a list of associated values of dictionaries, a new list,<em> result</em>,  is declared and initialized with empty values (Line 2).

Next, use for-loop to traverse through every string in the input <em>key_list </em>(Line 4) and use the traversed key to address the value in the<em> a_dict </em>and add it to the <em>result</em> list (Line 5)

At last, return the <em>result </em>list as output (Line 7)

We can test the function using the test case from the question and we shall see the output as follows:

[3, 2]

8 0
3 years ago
Other questions:
  • Which of the following is another name for cinematographers? (Select all that apply). lighting specialists production manager di
    8·1 answer
  • How do you think your ability to work might be affected if you don’t magnify a document so that text is at a size for you to rea
    9·1 answer
  • What is the purpose of the chart feature in word?
    15·1 answer
  • How do you add text to a blank slide layout?
    5·2 answers
  • What is BINARY it is making get confused
    10·1 answer
  • Which sentence is correctly punctuated? WILL GIVE YU MONEY GIVE ME YOUR CASH APP PLS
    12·2 answers
  • There is an interface I that has abstract class AC as its subclass. Class C inherits AC. We know that C delegates to an object o
    12·1 answer
  • Questions about the data policy and privacy policy of YT
    13·1 answer
  • All of the following are true about data science and big data except: a.Digital data is growing at the rate of 2.5 quintillion b
    15·1 answer
  • In what ways can information be slanted in a news report?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!