Find Jobs
Hire Freelancers

C Programming Assignment 2

$10-30 CAD

Terminado
Publicado hace alrededor de 8 años

$10-30 CAD

Pagado a la entrega
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.
ID del proyecto: 9965749

Información sobre el proyecto

2 propuestas
Proyecto remoto
Activo hace 8 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
$25 CAD en 2 días
5,0 (4 comentarios)
1,5
1,5

Sobre este cliente

Bandera de CANADA
Hamilton, Canada
5,0
27
Forma de pago verificada
Miembro desde feb 22, 2016

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.