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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  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.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  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.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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