Write a c program that reads an integer entered by the user

Assignment Help C/C++ Programming
Reference no: EM13963156

1-Write a C program that asks the user to enter a U.S dollar amount and then shows how to pay that amount using the smallest number of $20, $10, $5, $1, quarters, dimes, nickels, and pennies.

For example:
Enter a dollar amount: $78.49
$20 bills: 3
$10 bills: 1
$5 bills: 1
$1 bills: 3
Quarters: 1
Dimes: 2
Nickels: 0
Pennies: 4

2- Write a C program that reads an integer entered by the user and displays it in octal (base 8). The output should be displayed using five (5) digits, even if fewer digits are sufficient. Hint: To convert a number to octal, first divide it by 8; the remainder is the last digit of the octal number. Then divide the quotient by 8 and repeat the process to arrive at the next digit. (Do not use built-in C function to solve this problem. You must code it).

For example:
Enter a number between 0 and 32767: 2016
In octal, your number is: 03740

Reference no: EM13963156

Questions Cloud

Evaluate the effectiveness of previous marketing : Evaluate the effectiveness of previous marketing and positioning strategies of your chosen organisation to determine their effectiveness -  Identify and briefly discuss your chosen organisation's direction and marketing targets.
What is the rms value of the displayed signal : b) What is the value of the ac power that can perform the same amount of work as a 24 dc 0ne ?
Bonds to react to the announcement : RJR Nabisco also had $10 billion in bonds outstanding at the time of the dividend increase in Problem 1. How would you expect the bonds to react to the announcement? Why?
Estimate the number of meters in one light year : What's the difference between a logarithm of a product and the product of logarithms? Can you provide a simple example for each. Can you also be very detail in explaining the difference. I would really like to understand this more.
Write a c program that reads an integer entered by the user : Write a C program that reads an integer entered by the user and displays it in octal (base 8). The output should be displayed using five (5) digits, even if fewer digits are sufficient.
How you would integrate the data on the payscale website : Using external resources to gauge compensation levels may result in more equitable compensation planning. From the e-Activity, assess how you would integrate the data on the PayScale Website or similar sites into your compensation planning. Specif..
Revenues and earning dropped significantly : WeeMart, a retailer of children's clothes, announces a cut in dividends following a year in which both revenues and earning dropped significantly. How would you expect its stock price to react? Explain.
What is this critical speed : However, if you are going faster than a certain critical speed, there are some distances from the light for which you cannot do either (i.e. you are too far to make it through, and yet too close to stop). What is this critical speed?
Write a short paper on the network components : Perform research and write a short paper on the network components that make up a local area network.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd