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
What is a spreadsheet program?<br> A spreadsheet program is a computerized version of_________.
BabaBlast [244]
I dont know what exact answer youre looking for because you didnt provide options but..
"A spreadsheet<span> is </span>a sheet<span> of paper that shows accounting or other data in rows and columns; </span>a spreadsheet<span> is also a </span>computer<span> application </span>program<span> that simulates a physical </span>spreadsheet<span> by capturing, displaying, and manipulating data arranged in rows and columns."</span>
3 0
3 years ago
Read 2 more answers
Outcomes resulting from using incorect requirement specification during system development​
Vlada [557]

Answer:

please give full understandable question buddy

5 0
3 years ago
Describe software as a service. what features distinguish it from application software installed on a personal computing device
Triss [41]
???????????????????????????
6 0
3 years ago
Read 2 more answers
Another name for a computer's operating system
nadya68 [22]

Answer:

core engine or system software.

Explanation:

just because

5 0
3 years ago
Read 2 more answers
Which term describes the second core IPSec security protocol; it can perform authentication to provide integrity protection, alt
Sphinxa [80]

Answer:

Encapsulating Security Payload (ESP)

Explanation:

Encapsulating Security Payload is also known as ESP, it is a protocol that exists within IPSec, it helps in determining the authentication, integrity and how confidential network pack data / Payload in IPV4 and IPV6 networks are.

ESP supplies messages /Payload encipher, it also helps in authenticating Payload as well as where it originated from in the IPSec protocol suite.

6 0
3 years ago
Other questions:
  • While trying to solve a network issue, a technician made multiple changes to the current router configuration file. The changes
    7·1 answer
  • How many different integers can be represented with a 4-digit number in base 13?
    8·1 answer
  • Whats your favorite sport between these options?
    12·2 answers
  • you are concerned with security at your company and want to implement a technology that requires no configuring on the users sid
    15·1 answer
  • #11. Write a program that prompts the user to input a four-digit positive integer. The program then outputs the digits of the nu
    6·1 answer
  • Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per l
    14·1 answer
  • Cual es la importancia de aplicar los pasos en el modelo de diseño en las actividades académicas?
    14·1 answer
  • Assume you are using the text's array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements and
    13·1 answer
  • Where is the third vanishing point in the three point perspective
    8·1 answer
  • Write a flowchart and C code for a program that does the following: Uses a do...while loop. Prints the numbers from 1 to 10 with
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!