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

  Generating class diagram and pseudocode

Develop a class named CustomerRecord which holds a customer number, name, and address. Incorporate different methods in order to set the values for each data field and output values for each data field.

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Determining the bmi

Develop a modular system which determines and display a person’s body mass index (BMI). The BMI is often used to calculate whether a person with the sedentary lifestyle is overweight or underweight for their height.

  Program to calculate the weight of students

We have run regression analysis along with the resulting estimated regression equation as follows:” the estimated weight equals (-180 pounds) plus (5 pounds times the height in inches).” Write down the program to calculate the weight of students.

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Chomsky normal form

Requesting assistance with the Theory of Computing.Construct a PDA that accepts L.

  Constructing threat model to explain risk

Construct a simple threat model which explains the risk this represents: attacker(s), vulnerability, attack vector, assets, and likelihood of the occurrence, likely impact, and plausible mitigations.

  Designing an inventory management system

Xhemrock is a brake pad manufacturing company. This company utilizes the raw materials, like carbon powder, ash, iron, and resin. It wishes to design an inventory management system which will have the following attributes: The system must store th..

  Identifying the information security problem

In relation to the project management tools, discuss and give two examples or scenarios in order to demonstrate how the work breakdown structure could recognize and plan an information security problem or issue in the organisation.

  How to produce a work breakdown structure

How to produce a Work Breakdown Structure. Ensure main WBS tasks headings are the 5 PMBOK® process areas.

  Installing the new network

You have been hired as an IT Consultant in order to assist Good Nature food market with developing and implementing the new network. They have hired you to find what type of network they required and to install the network.

  State diagram for coffee machine controller

Raw behavioural specs utilizing the state diagram for the coffee machine controller explained as follow. State events, State actions.

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