Predict the out put
Take enter fraction 1:4/4
Enter fraction 2:4/4
#include<stdio.h>
typedef struct
{
    int n;
    int d;
}FRACTION;
void main()
{
FRACTION a, b, c;
 printf("enter fraction 1:\n");
 scanf("%d%d",&a.n,&a.d);
printf("enter fraction 2:\n");
 scanf("%d%d",&b.n,&b.d);
c.n=a.n*b.n;
c.n=a.d*b.d;
printf("%d%d*%d%d=%d%d\n",a.n,a.d,b.n,b.d,c.n,c.d);
}

Posted on by