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]
3 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]3 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]3 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
If a _____ error appears when you run a macro that has worked in the past, some part of the macro code no longer makes sense to
Burka [1]
If a run-time error appears when you run a macro that has worked in the past, some part of the macro code no longer makes sense to excel, ehere run-time denotes <span> the time during which a program is running</span>
This error occurs while the program is running.
Running<span> out of memorywill results in  a </span>run-time error.
5 0
3 years ago
Using SQL
lesantik [10]

Answer:

Following are the code to this question:

/*using the select statement, that selects column name from the table blog.posts */  

SELECT blog.posts.user_id, blog.posts.body, users.name/*column name user_id, body, name*/  

FROM blog.posts/* use table name blog.posts*/

RIGHT OUTER JOIN users ON blog.posts.user_id = users.id;/*use right join that connect table through user_id*/

Explanation:

In the structured query language, RIGHT JOIN  is used to recovers from both the right side of the table both numbers, although the left table has no sets. It also ensures that even if the 0 (null) documents are linked inside this left table, its entry will always return the outcome row, but still, the number of columns from its left table will be NULL.

In the above-given right join code, the select statements used that selects the column names "user_id, body, and the name" from the table "blog. posts" and use the right join syntax to connect the table through the id.    

7 0
3 years ago
In the CPT manual, the digits of the Category III codes are not intended to reflect the placement of the code in the Category I
dexar [7]

Answer:

Nomenclature

Explanation:

In the CPT manual, the digits of the Category III codes are not intended to reflect the placement of the code in the Category I section of the CPT Nomenclature .

3 0
3 years ago
Which option describes a systematic error in measuring in the following scenario?
katrin [286]

Answer:

D - The patient’s weight is inaccurate due to the calibration of the scale.

Explanation:

if feel like it is but i'm not 100% sure, sorry if not right answer ( also taking the assignment )

7 0
2 years ago
Write a program that creates a plot of the power consumed by a 1000 resistor as the voltage across it is varied from 1 V to 200
lapo4ka [179]

Answer:

Program to Plot  the power in Watts

voltage=1:200;

resistance=1000;

current=voltage/resistance;

power=current.*voltage;

plot(voltage,power);

xlabel('Voltage in Volts');

ylabel('Power in Watts'); //plot of this program is attached

Program for power in dBW

voltage=1:200;

resistance=1000;

current=voltage/resistance;

power=current.*voltage;

powerdB=10*log10(power);

plot(voltage,powerdB);

xlabel('Voltage in Volts');

ylabel('Power in dBW'); // plot output is also attached

I hope it will help you!

3 0
3 years ago
Other questions:
  • If you wanted to only view the sales of $200,000+ in the table above, which number filter would you select?
    7·1 answer
  • you just bought a new hard drive for your computer you plan to use this as a secondary hard drive to store all um a files once i
    5·1 answer
  • Select the correct answer. Larry finds it easy to run legacy programs and applications in a virtualized environment. How does th
    5·1 answer
  • Print a countdown from n to 1 The function below takes one parameter: an integer (begin). Complete the function so that it print
    8·1 answer
  • Camille prepared excellent PowerPoint slides for her speech about education reform, but the speech didn't go as well as she had
    15·1 answer
  • Write a function called factor that determines for a pair of integers whether the second integer is a factor of the first. The f
    11·1 answer
  • Thomas came into work this morning and turned on his computer and nothing happened. He immediately called the help desk, and you
    5·1 answer
  • Match the following:
    10·1 answer
  • Mary recently read about a new hacking group that is using advanced tools to break into the database servers of organizations ru
    14·1 answer
  • To solve the difficulty of scaling memory organization, memories are physically organized into a ____-dimensional organization.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!