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

  Design an application for the homestead furniture

Design an application for the Homestead Furniture Store that gets sales transaction data, including an account number, customer name, and purchase price. Output the account number and name, then output the customer's payment for each month for the ne..

  Local resturant automate its breakfast billing system

Use an array , menuList, of the struct menuItemType. use an array, menuList, of the struct menuItemType. your program must contain at least the following functipons : your program must contain at least the following functipons.

  Exploring health care professions

Exploring Health Care Professions: 1) Go to the textbook companion Web site or CD. Explore the Professional Profiles Videos. NOTE: You will also be using the profession you choose in this assignment to answer questions for later lessons in the course..

  The process function will then need

The process function will then need to find the time the person waited by calling the time function and finding the difference between the start and end timestamps. Save this time to an accumulator so that in the end you can find the average wait tim..

  Write a literal representing the long integer

Write a literal representing the long integer value twelve billion.

  Write a program that asks the user to enter two numbers

Write a program that asks the user to enter two numbers. The program should use the conditional operator to find which number is the smaller and which is the larger.

  Implement solver for stiff system of differential equations

Implement a solver for the stiff system of differential equations - Array of doubles of length n containing the initial value.

  Determine how many consonants are in an entered string

Write a program that determines how many consonants are in an entered string of 50 characters or less. Output the entered string and the number of consonants in the string.

  Writing a program that creates a linked list

Writing a program that creates a linked list from 100 randomly generated numbers and sorts the using a heap. One heap in ascending order and one heap in descending order. Then displays the original linked list and both sorted lists.

  Expand the "currency conversion" program to include a menu

Expand the "Currency Conversion" program to include a menu that allows the user to choose which currency he/she wishes to display in its equivalency to the US dollar. - Correctly use at least 1 function or subroutine

  State diagram to recognize one form

Design a state diagram to recognize one form of the comments of the C-based programming languages, those that begin with /* and end with */. and also Write and test the code to implement the state diagram.

  Task 1 for your first task you will prepare sorted

task 1 for your first task you will prepare sorted versions of the linked lists and vector data structures developed

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