Program:
#include<stdio.h>
int main( )
{
float num1,num3,num2,num4,output;
printf("\nEnter the values of num1 : ");
scanf("%f",&num1);
printf("Enter the values of num2 : ");
scanf("%f",&num2);
printf("\nFractional value is %.0f/%.0f",num1,num2);
printf("\nEnter the values of num3 : ");
scanf("%f",&num3);
printf("Enter the values of num4 : ");
scanf("%f",&num4);
output=(num1*num4+num3*num2)/(num2*num4);
printf("\nSum of fractional terms %.2f",output);
return 0;
}
Output: