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
C# variables and classes

This quiz contains questions about C# classes and variables.

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.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Javscript Basics

Quiz on basics of javascript programming language.