A program that converts knuts to sickles and galleons

Assignment Help Computer Engineering
Reference no: EM132194691

Question :

Write a C program that converts knuts to sickles and galleons (the currency of the HarryPotter novels).The user will enter the total number of knuts. There are 29 knuts in one sickle and 17 sickles in one galleon.

Hint: Divide the amount by the number of knuts in one galleon to determine the number of galleons, and then reduce the amount by the total value of the galleons (You can also use a remainder operator). Repeat for sickles. Be sure to use integer values throughout, no floating-point numbers.

If the amount entered is less than zero or greater than one billion (1000000000), output an error message and abort the program.

Reference no: EM132194691

Questions Cloud

Calculate the value of e using a function : Write a C++ program that will calculate the value of "e" (Euler's number, e = 2.71828...) using a function you create named "find_e".
Write a program that displays a single character : Write a program that displays a single character in all possible combinations of foreground and background colors (16 16 256). The colors are numbered
Do you believe that the federal reserve should be controlled : Do you believe that the Federal Reserve should be controlled by Congress? Please Explain.
Describe the effect on gdp-unemployment : Describe the effect on GDP, unemployment, and inflation of each of the following: (a) war, (b) elimination of environmental regulations, and (c) cuts in welfare
A program that converts knuts to sickles and galleons : Write a C program that converts knuts to sickles and galleons (the currency of the HarryPotter novels).The user will enter the total number of knuts.
Accurate measure of the standard of living : Is gross domestic product an accurate measure of the standard of living? Why or why not?
Create a 2-dimensional array of 10 by 5 elements : Create a 2-dimensional array of 10x5 elements that are populated by random numbers between 0 and 49.
Medical marijuana laws : In recent years, about twenty states have passed so-called medical marijuana laws. Typically, these laws permit individuals to lawfully purchase marijuana
Legalization of presently illegal substances : Of what significance is the elasticity of demand for drugs in the debate about legalization of presently illegal substances?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Research parallel computing and prepare an informal paper

Research parallel computing and prepare an informal paper 2 -3 pages in length, single spaced with a blank line beltween paragraphs.

  You are the communications coordinator for a national drug

you are the communications coordinator for a national drug manufacturer. recently there have been reports of

  Research the fire at the federal aviation administration

What went wrong? What went right? Would a risk assessment strategy if employed mitigate this situation from occurring?

  Display the impact speed of the first three bounces

Write test and run a c++ Program that calculation and display the impact speed of the first three bounces and the rebound height of each bounce.

  What is the capacity of a particular airplane sort

You must first determine what entities want to track. Next determine what attributes are needed for each entity, and what relations exist between these entities. You should draw an E-R diagram to show these relations. Be sure to indicate all keys...

  Write a function that accepts a string and an integer

Write a function called capitalize() that capitalizes the second and third letters of a string. If the string length s less than three, return the same string.

  Develop a fact-finding for planning and analysis

Develop a fact-finding for planning and analysis in order to determine improvements in organisational processes.

  Find the system response due to given an input

A filter has the sinusoidal amplitude response shown in Fig. P3.1.2. The phase response is lin- ear with slope -2-rr/O.

  Discuss some of the information technology needs of health

write 400-600 words that respond to the following questions with your thoughts ideas and comments. be substantive and

  Determine which version of the software should be used

Microsoft has released Windows Server 2008. As with Windows 2003, there are several versions of the server software. What are these versions, and what are the criteria that determine which version of the software should be used

  Design a generic unit that implements maps

Design a generic unit that implements maps. A map is an unordered collection of (key, value) entries in which no key is duplicated.

  How a risc cycle is obtained from the von neumann cycle

Draw the Von Neumann Cycle and explain the basic function carried out in each state. Explain clearly how a RISC cycle is obtained from the Von Neumann cycle.

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