ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 19 May 2017 My Price 8.00

Project 4, Program Design

Hello, my favorite tutor!   Can you please help me with this c program?

 

Project 4, Program DesignImportant: the programs in this project will be graded based on whether the requiredfunctionality were implemented correctly instead of whether it produces the correct output, forthe functionality part (80% of the total grade)1.Modify Project 1 (dollar.c) (Write a C program that asks the user to enter a U.S. dollar amountand then shows how to pay that amount using the smallest number of $20, $10, $5, and $1bills.)So it includes the following function:void pay_amount(int dollars, int *twenties, int *tens, int*fives, int *ones);The function determines the smallest number of $20, $10, $5, and $1 bills necessary to paythe amount represented by thedollarsparameter. Thetwentiesparameter points toa variable in which the function will store the number of $20 bills required. Thetens,fives,andonesparameters are similar. Modify themainfunction so it callspay_amountto compute the smallest number of $20, $10, $5, and $1 bills. Themainfunction should display the result.2.Modify Project 2 (fraction.c) so it reduces the fraction to lowest terms:Enter two fractions separated by the operator: 4/9 – 1/9The result is: 1/3The program should include the following function:void reduce(int numerator, int denominator, int*reduced_numerator, int *reduced_denominator);numeratoranddenominatorare the numerator and denominator of a fraction.Reduced_numeratorandreduced_denominatorare pointers to variable in whichthe function will store the numerator and denominator of the fraction once it has beenreduced to lowest terms. Modify themainfunction so it callsreducebefore displayingthe result.To reduce a fraction to lowest terms, first compute the GCD (greatest common divisor) ofthe numerator and denominator. Then divide the numerator and denominator by the GCD.Add the following function to your program that finds the GCD of two numbers m and n:int find_gcd(int m, int n){if(n == 0) return m;return find_gcd(n, m%n);}

Attachments:

Answers

(11)
Status NEW Posted 19 May 2017 12:05 AM My Price 8.00

-----------

Not Rated(0)