Find Jobs
Hire Freelancers

C Programming Assignment 2

$10-30 CAD

Ολοκληρώθηκε
Αναρτήθηκε περίπου 8 χρόνια πριν

$10-30 CAD

Πληρωμή κατά την παράδοση
FRACTION SIMPLIFIER The following fraction simplifier program accepts a fraction, simplifies it, and then displays the result. Your task is to complete this program. Your solution declares a Fraction type, which holds the numerator and denominator as separate members and includes the definitions of three functions with the following prototypes • void enter(struct Fraction*); • void simplify(struct Fraction*); • void display(const struct Fraction*); Complete the following program by adding the missing code: // Fraction Simplifier // w9.c #include <stdio.h> // insert Fraction declaration first // insert function prototypes here int main(void) { struct Fraction f; printf("Fraction Simplifier\n"); printf("===================\n"); enter(&f); simplify(&f); display(&f); } // insert your function definitions here The output from your completed program looks something like Fraction Simplifier =================== Numerator: 4 Denominator: 16 1 / 4 Your enter() function receives the address of a Fraction object, accepts from the user the numerator and denominator and stores those values in the object's members. Your simplify() function receives the address of a Fraction object and reduces the numerator and denominator, if possible. For a complete solution you need to design an algorithm that simplifies a fraction. Your display() function receives the address of a Fraction object and displays the object's numerator and denominator. Test several fractions to ensure that your algorithm works for all cases. Include negative as well as zero values in your test cases. Done ////////////////////// Second job attached as word document.
Ταυτότητα εργασίας: 9965749

Σχετικά με την εργασία

2 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 8 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
Βραβεύτηκε στον/στην:
Avatar Χρήστη
$25 CAD σε 2 ημέρες
5,0 (4 αξιολογήσεις)
1,5
1,5

Σχετικά με τον πελάτη

Σημαία της CANADA
Hamilton, Canada
5,0
27
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Φεβ 22, 2016

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.