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

  Point-to-point communication links

Suppose there is the wide-area network with N nodes, where N ≥ 2. Find out the smallest number of the point-to-point communication links such that each node within the network is able to talk to one another node?

  Detail advantages of looping

Detail advantages of looping

  Creating a program with a building as subclass

Assume the existence of the Building class. Describe a subclass, ApartmentBuilding that consists of following instance variables: an integer, a boolean, numFloors, an integer, hasElevator, unitsPerFloor, a boolean, hasCentralAir, and a string, man..

  Esmitating the output of the given code

State the output of following statements? cout

  Describing the views

Explain why do you think that views by themselves are insufficient in order to protect the access by the unauthorized users?

  Program to determine persons body mass index

Develop a program which determines a person's body mass index. Develop the modular program which determine and display a person's body mass index (BMI).

  While running snort ids why may there be no alerts

While running Snort IDS why may there be no alerts

  Type of data standard

What type of data standard are we dealing with in each scenario (metadata, spatial or attribute)? You work for Town of Ancaster prior to an amalgamation of New City of Hamilton. Your main responsibility was to retain Town's single line road network f..

  Write down a css rule

Write down a CSS rule

  Developing the flowchart as per the algorithm

Design an algorithm to prepare a job applicant report. Input contains of a series of records which consists of the Social Security number or equivalent, last name, first name, middle initial, verbal test score, science test score, math test score,..

  Project lacking the minority project

Give three examples of why a project might lack the technical feasibility.

  Assuring the snmp security

Create an argument for modifying to the other version or staying with v1 and forming the essential modifications to assure the SNMP security the v1 requires.

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