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
Your search google for recipe for tonight dinner is an.example of ?​
Rina8888 [55]

The example is, ethier you need cooking classes or you wish to try something new

Hope the little humor helps

3 0
3 years ago
Read 2 more answers
What is one benefit of using electronic sticky notes ?
balu736 [363]
They can be used to just copy/paste e-mailed information without writing down on a paper and losing valuable time. This is one example.
4 0
3 years ago
Read 2 more answers
The ____________ is the number of rectangles an image has in a square inch.
miv72 [106K]
D size




Read more




































Hope,this helped
7 0
3 years ago
Read 2 more answers
¿que lenguaje de programacion usan los operadores matematicos?​
kolbaska11 [484]

Answer:

Matlab / GNU Octave. MATLAB (laboratorio de matrices) es un entorno informático numérico multiparadigma y un lenguaje de programación de cuarta generación.

Explanation:

8 0
3 years ago
Read 2 more answers
Mike recently started using Google Display Ads to create a more automated approach to managing his campaigns. What's one automat
Marysya12 [62]

Answer:

Automated targeting

Explanation:

Display Automated Targeting is an automated targeting option within the Audience settings of the display campaigns that gives Google full right to show your ads to an audience that is “similar” to the one you specified.

8 0
3 years ago
Other questions:
  • Running the cpu at a faster speed than the manufacturer recommends is called ________.
    11·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    9·1 answer
  • Want is the assignmment
    8·1 answer
  • The exponential distribution is often used to model what in a queuing system?
    12·1 answer
  • What is java Encapsulation?​
    6·1 answer
  • Write a program that reads a person's first and last names, separated by a space. Then the program outputs last name, comma, fir
    9·1 answer
  • Write a recursive function sumAll that accepts an integer argument and returns the sum of all the integers from 1 up to the numb
    10·1 answer
  • Copy and paste is the only way to move text from one place to another.<br><br>True or <br>False​
    15·2 answers
  • Javed’s teacher tells him she would like to see him improve his speaking skills in the next debate by including a rhetorical app
    9·1 answer
  • Which excel feature makes it easy to copy and paste formulas in multiple cells?.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!