Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 438 Weeks Ago, 1 Day Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Programming Posted 13 Jun 2017 My Price 4.00

Write a C program with a function named change()

Write a C program with a function named change() that accepts a single-precision number and the addresses of the integer variables names 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 the respective variables declared in its calling function. Sample output:

Enter an amount of money: .98

The number of quarters is 3
The number of dimes is 2
The number of nickels is 0
The number of pennies is 3


Enter an amount of money: 2.32

The number of quarters is 9
The number of dimes is 0
The number of nickels is 1
The number of pennies is 1

Answers

(8)
Status NEW Posted 13 Jun 2017 05:06 AM My Price 4.00

-----------

Attachments

file 1497331301-Answer.docx preview (87 words )
#-----------inc-----------lud-----------e&a-----------mp;-----------lt;-----------std-----------io.-----------h&a-----------mp;-----------gt;----------- v-----------oid----------- ch-----------ang-----------e(f-----------loa-----------t a-----------,in-----------t* -----------q,i-----------nt*----------- d,-----------int-----------* n-----------, i-----------nt*----------- p)-----------{ -----------int----------- to-----------tal----------- = -----------(in-----------t)(-----------a*1-----------00)-----------; ----------- -----------*q -----------= t-----------ota-----------l/2-----------5; ----------- ----------- *d----------- = -----------(to-----------tal------------*q----------- * -----------25)-----------/10-----------; ----------- -----------*n -----------= (-----------tot-----------al ------------ *-----------q *----------- 25----------- - -----------*d -----------* 1-----------0)/-----------5; ----------- ----------- *p----------- = -----------(to-----------tal----------- - -----------*q -----------* 2-----------5 ------------ *d----------- * -----------10 ------------ *-----------n *----------- 5)-----------; -----------} -----------int----------- ma-----------in(-----------){ ----------- fl-----------oat----------- a;----------- i-----------nt -----------q,d-----------,n,-----------p; ----------- pr-----------int-----------f(&-----------quo-----------t;E-----------nte-----------r a-----------n a-----------mou-----------nt -----------of -----------mon-----------ey:----------- &q-----------uot-----------;);----------- s-----------can-----------f(&-----------quo-----------t;%-----------f&q-----------uot-----------;,&-----------amp-----------;am-----------p;a-----------); ----------- ch-----------ang-----------e(a-----------,&a-----------mp;-----------amp-----------;q,----------- &a-----------mp;-----------amp-----------;d,----------- &a-----------mp;-----------amp-----------;n,----------- &a-----------mp;-----------amp-----------;p)-----------; -----------pri-----------ntf-----------(&q-----------uot-----------;Th-----------e
Not Rated(0)