Write a c function named change that has a floating point

Assignment Help Computer Engineering
Reference no: EM1325285

Write a C function named change that accepts a floating point number of total coins 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 total coins number passed to it and write these values directly into the respective variables declared in its calling function using pointers.

Call the function change from main function three times and print out the contents of the variables quarters, dimes, nickels, and pennies after each function return.

First Call: pass in the total value $1.88 and on return print the contents of the variables.

Second Call: pass in the total value .32 and on return print the contents of the variables.

Third Call: ask for a total value input from the keyboard and on return print the contents of the variables.

Output should look like following:

TOTAL VALUE ENTERED: 1.88
7 quarters
1 dime
0 nickels
3 pennies
and not:

TOTAL VALUE ENTERED: 1.88
7 quarters
18 dimes
37 nickels
188 pennies

Reference no: EM1325285

Questions Cloud

Describe the arp process : What is a ARP Request and ARP Reply?What is the broadcast.
How technology is changing competitive business landscape : Explain how technology is changing the competitive business landscape - Technology is an important component of the business environment.
Cultural norms and universality : Can we assume when working with an individual from a diverse culture that all cultural norms apply universally to all people from that culture?
Ethical accounting standards : It is the responsibility of the management to apply accounting standards if communicating with investors and creditors through financial statements. How may an auditor's ethics be challenged while performing the audit?
Write a c function named change that has a floating point : Call the function change from main function three times and print out the contents of the variables quarters, dimes, nickels, and pennies after each function return.
Explain elements of a formal e-business project plan : Explain Elements of a formal e-business project plan- ROI evaluation of new technologies and what are the most important elements in conducting a technology alternatives cost analysis
Prepare a paper describing the telecommunication systems : Workplace Telecommunications systems - Prepare a paper describing the telecommunication systems used at your workplace.
Roi for mip on original estimate : What is the ROI for MIP based on original estimates? What is the ROI if Richard Lawrence's new revenue projections are used?
Determine one protocol which works at the osi layer 2 : suppose you are Dave Baker, the Senior System Administrator from Minnesota Consulting Group (MCG). The company with which MCG has an ongoing contract wishes to have some basic TCP/IP concepts explained to senior decision-makers.

Reviews

Write a Review

Computer Engineering Questions & Answers

  What is role of risk assessment

What is role of risk assessment

  What is the significance of optimizing the design

What is the significance of optimizing the design

  Implementing the nested – loop join algorithm

Implement the Nested – Loop Join algorithm in any of the programming language.The solution should involve:a) Source file of application,

  Program to calculate salary of family members

Suppose that your family has 10 members. Suppose further that every family member has the particular amount of the savings. Your task is to find: The total amount of savings that the family has, as a whole and To find who has the largest savings.

  Impact of computer on people and organizations

Impact of computer on people and organizations

  Mapping the cache organization

A computer has a memory of 16 blocks, 32 bytes each, and a cache of 8 blocks, which blocks may be read from the block No. 5 in the cache, if the system utilizes: Fully associative the mapping cache organization.

  Security vulnerability

What is the security vulnerability of this solution

  Developing the java program

The Java String class explains the following method in order to split a Java String object into several fragments of the substrings and store them in a returned String array.

  Generate a work breakdown structure code

Generate a Work Breakdown Structure Code

  Explailning the forensic investigative approach

We require to assure this applicant know how to find the facts of incident and develop an initial forensic investigative approach.

  How to develop a problem definition

How to develop a problem definition

  Write down the definitions for a double-stack structure

Write down the definitions for  a double-stack structure

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