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
Tanya [424]
4 years ago
12

Assume you have a variable sales of type Money where the latter is a structured type with two int fields, dollars and cents. Wri

te a statement that reads two integers from standard input, a dollar amount followed by a cents amount, and store these values in the appropriate fields in sales.
struct Money
{
int dollars,cents;
};

int x,y;
cin>>x>>y;
sales.dollars= x;
sales.cents= y;
Computers and Technology
2 answers:
7nadin3 [17]4 years ago
8 0

Answer:

The answer to the question is included in your question. I guess you need an explanation or clarification.

See Explanation Below

Explanation:

struct Money

{

int dollars,cents;

};

int x,y;

cin>>x>>y;

sales.dollars= x;

sales.cents= y;

The code segment is written in C++ programming language

On Line 1 of the code segment;

The struct keyword is used in c++ and other c type programming to define structure. The name of the structure is Money.

It defines a data type such that the data type is a collection of system and user defined data types

The Money structure defines two integer variables; dollars and cents on line 3.

On line 6, two integer variables x and y are declared.

On line 7, the two variables received inputs from the user.

On line 8, the value of variable x is assigned to dollar

On line 9, the value of variable x is assigned to cent

Nuetrik [128]4 years ago
3 0

Answer:

int x,y;

cin>>x>>y;

sales.dollars= x;

sales.cents= y;

Explanation:

The answer is already part of the question.

First, integer x and y is declared. Then, x and y is received via the standard input. Then x is assigned to sales.dollars while y is assigned to sales.cents.

You might be interested in
Free points! your welcome
Dvinal [7]

Answer:

Thanks!!!!

Explanation:

5 0
3 years ago
Read 2 more answers
How do media and networks interact?
bagirrra123 [75]

Answer:

The answer is C. Media are connected to networks that make information easier to  access and pass on.

Explanation:

Hope this helps you out! Please mark brainliest if it does! :D

4 0
3 years ago
What is another term for online data storage?
Aloiza [94]
Cloud storage, meaning storage own by someone else like Google drive
3 0
3 years ago
Which pdu is processed when a host computer is de-encapsulating a message at the transport layer of the tcp/ip model?.
yulyashka [42]

The PDU that is processed when a host computer is de-encapsulating a message at the transport layer of the tcp/ip model is segment.

<h3>What is this PDU about?</h3>

Note that in the transport layer, a host computer is said to often de-encapsulate  what we call a segment so that they can be able to put back data to an acceptable or given format through the use of the application layer protocol that belongs to the TCP/IP model.

Therefore, The PDU that is processed when a host computer is de-encapsulating a message at the transport layer of the tcp/ip model is segment as it is the right thing to do.

Learn more about host computer from

brainly.com/question/553980

5 0
2 years ago
What is a pair of colors that are opposite to each other on the color wheel called?
Alinara [238K]

What is a pair of colors that are opposite to each other on the color wheel called?

D:Complementary


3 0
3 years ago
Read 2 more answers
Other questions:
  • Microsoft Surface can do all of the following except ______.
    12·2 answers
  • Write a program whose input is two integers and whose output is the two integers swapped. Place the values in an array, where x
    12·1 answer
  • A ________ -tier design includes a middle layer between the client and server that processes the client requests and translates
    11·1 answer
  • Zack is working on an assignment at school. He wants to save his work so he can take it home and complete it on his home compute
    13·1 answer
  • Which of the following is NOT a means of advertising on websites?
    12·2 answers
  • The _________keys include the home, end, and arrow keys.
    13·1 answer
  • The ________ file system supports a maximum file size of 2gb
    12·1 answer
  • Give the uses of Word’s mail merge.
    8·1 answer
  • Here’s my last question
    12·2 answers
  • Question 7 of 25
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!