Purchase Solution

C+ programming functions program

Not what you're looking for?

Ask Custom Question

Write a C function named change() that accepts a floating point number and the addresses of the integer variables named quarters, dimes, nickels, and pennies. The function should determine the number of quarters, dimes, nickels, and pennies in the number passed to it and write these values directly into respective variables declared in its calling function.

Purchase this Solution

Solution Summary

C+ programming functions program is modeled.

Solution Preview

You will have to make this code compile and run, but all the basic ideas are here and explained below.
<br>
<br>void change(
<br> float amountNeedingChange, //this is the input dollars to be changed
<br> int *pNQuarters, // pointer to output number of quarters
<br> int *pNDimes, // pointer to output number of dimes
<br> int *pNNickels, //pointer to output number of nickels
<br> int *pNPennies //point to output number of pennies
<br> )
<br> {
<br> int remainder; //this is the amount left over ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic Networking Questions

This quiz consists of some basic networking questions.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Javscript Basics

Quiz on basics of javascript programming language.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.