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
Help me to write spaghetti stack function, please!!
Mariulka [41]
Pointer tree is here

7 0
3 years ago
A field value is currently not in any group. what happens when you try adding it to an existing group?
ivann1987 [24]

When a  field value is currently not in any group,  What happens when you try adding it to an existing group is that It is removed from the "all" list, and placed under its new group.

<h3>What is a  field value?</h3>

The value of a field  can be described as the  string of bytes,  which do contains  all bytes in the field after the first colon.

The field value function is is useful in a case whereby extraction of the field data from linked data types is needed.

It is a good method thst used when writing formulas that refer to data types, and that is why the field value do help the user when creating a conditional calculations using a linked data types.

It also gives the enablement in the extraction of the exact values from the cell linked to data types.

It should be noted that this field value is  concatenation of all the lines  found in the the field, outside the  starting name and colon, hence When a  field value is currently not in any group,  What happens when you try adding it to an existing group is that It is removed from the "all" list, and placed under its new group.

Find out more on field value at brainly.com/question/843074

#SPJ1

6 0
1 year ago
PLS HURRY!!!<br> Look at the image below
trasher [3.6K]

The correct choices are:

having the user guess a number and keep guessing till they get it right

allowing the user to enter their best friends names without saying how many friends they can have

writing a program to average numbers without requiring the user to count the numbers.

4 0
3 years ago
Fill in the blanks with the correct words.
viva [34]

Answer:

1) Horizontal

2) Insert

3) Adjustment

4) Cell Style

5) Option-numeric

Explanation:

4 0
2 years ago
My android phone is so bad and laggy and old i have no money to buy newwhat should i do.?device model is mycell spider v7 tab​
Alla [95]
Oh depending on the make (not familiar with that model) you could run a custom rom on it! A good cooked rom could bring new life to your old device just read the documentation and look into it more; you could also try seeing a maintenance specialist but for a phone there are limited solutions unfortunately.
7 0
3 years ago
Other questions:
  • The dashed lines that display on your slide when you are moving an object are
    10·1 answer
  • Max Weber's concept of ________ implies that, in conducting research, social scientists must try to understand others' view of r
    14·2 answers
  • It is possible to make the document larger for viewing small text. <br> True or False
    13·2 answers
  • Data means a group of numbers. <br> a. True<br> b. False
    7·1 answer
  • Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then write a statement to output the month,
    10·1 answer
  • A_______ to show the working of an object before it is built or made. A. Prototype b. Test c. Evaluation d. Plan
    10·1 answer
  • 50 PTS
    5·1 answer
  • Explain why this scenario could put an organization in jeopardy of losing some of its workforce.
    12·1 answer
  • I want know answer for best way to copy formula on MS Access
    10·1 answer
  • When determining how much money to borrow in loans to pay for your higher education, which of the following items should not be
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!