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
fomenos
3 years ago
8

Assume that price is an integer variable whose value is the price (in US currency) in cents of an item. Write a statement that p

rints the value of price in the form "X dollars and Y cents". So, if the value of price was 4321, your code would print "43 dollars and 21 cents". If the value was 501 it would print "5 dollars and 1 cents". If the value was 99 your code would print "0 dollars and 99 cents".
Computers and Technology
1 answer:
aivan3 [116]3 years ago
3 0

Answer:

// here is program in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variable

int price;

cout<<"enter the price: ";

// read the price

cin>>price;

// find the dollars

int doll=price/100;

// find the cents

int cent=price%100;

// print the dollars and cents

cout<<doll<<" dollars and "<<cent<<" cents.";

return 0;

}

Explanation:

Read the price from user and assign it to variable "price".Then find the dollars by dividing the price with 100 and to find cents calculate modulus 100 of price. Then print both the value.

Output:

enter the price: 4321                                                                                                      

43 dollars and 21 cents.

You might be interested in
What are the modes of operation of WLANs?
Nimfa-mama [501]

Answer:

WLAN's or Wireless LAN Units have 2 main modes of operation

Explanation:

The Two Main modes of Operation are the following

<u>Infrastructure Mode:</u> in this mode the main WLAN unit becomes the main connection point in which all devices are connected to and the main unit provides an internet connection to all the devices connected to it.

<u>Ad Hoc Mode:</u> in this mode devices transfer data from one another back and forth without permission from a base unit.

Some WLAN units will also include 2 extra modes of operation called Bridge and Wireless Distribution System (WDS).

<u>Bridge Mode:</u> this mode allows the base unit to act as an intermediary and bridge two different connection points. Such as bridging a wired connection with a wireless one.

<u>WDS Mode:</u> this mode uses various access points to wirelessly interconnect devices to the internet using repeaters to transmit connections. It can provide internet to both wired and wireless clients.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

6 0
4 years ago
System memory is on a computer motherboard?
Leya [2.2K]
Is this a true or fales question

8 0
4 years ago
Read 2 more answers
E) Point out the errors( if any) and correct them:-
leonid [27]

Explanation:

double e-d/5.6;is wrong it should return to c

5 0
3 years ago
I don't know how to explain what is motion in my own words
marusya05 [52]
Motion is the movement of a body part or an object
8 0
4 years ago
Read 2 more answers
Sam works in a real estate office. An offer comes in on a house but the homeowners are on vacation. He needs the homeowners to s
Digiron [165]

Answer:

Sam should send a digital document and request a signature. The could be fax or even an image printed out, if neither is possible get in contact with eh owner and his lawyer for more help.

Explanation:

3 0
3 years ago
Other questions:
  • Yahoo! allows users to create personalized my yahoo! pages. users can add or delete a variety of information from their personal
    8·2 answers
  • When the increment or decrement operator is placed before the operand (or to the operand's left), the operator is being used in
    6·1 answer
  • What cable should i be using to connect my android tablet to the pc?
    13·2 answers
  • 4. Who developed the first design technology program which had a
    12·1 answer
  • In addition to the four primary computer operations, today's computers almost always perform ____ functions.
    7·1 answer
  • A smart phone is always a _____.<br> client<br> server<br> network<br> process
    10·1 answer
  • Linda has written a program that works well on various operating systems, but she needs to increase the readability of the progr
    14·1 answer
  • Match each word to its correct meaning.
    11·1 answer
  • When a collection of honeypots connects several honeypot systems on a subnet, it may be called a(n) honeynet
    9·1 answer
  • Please help me ASAP!
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!