C Code for Fraction Operations

This c programming code is used to find the fraction operations. You can select the whole c code by clicking the select option and can use it. When you click text, the code will be changed to text format. This c program code will be opened in a new pop up window once you click pop-up from the right corner. You can just copy, paste this c code and use it to find the fraction operations.

#include<stdio.h>
#include<math.h>
#include<string.h>
main()
{
    int add,sub,mul,dd;
    int add1,sub1,mul1,dd1;
    int a,b,c,d;
    a=2;
    b=4;
    c=4;
    d=5;
    //Add
    add=(a*d+b*c);
    add1=(b*d);
    printf("\nAddition: %d/%d",add,add1);
    //Subtraction
    sub=(a*d-b*c);
    sub1=(b*d);
    printf("\nSubtraction: %d/%d",sub,sub1);
    //Multiplication
    mul=(a*c);
    mul1=(b*d);
    printf("\nMultiplication: %d/%d",mul,mul1);
    //Division
    dd=(a*d);
    dd1=(b*c);
    printf("\nDivision: %d/%d",dd,dd1);
}
Other Programming Codes
Online Calculator : Fraction Operations
Click on the select code link to copy and paste this free c program code for fraction operations.

english Calculators and Converters


Sitemap