23.(C) Improper function to Mixed function from Toph
#include<stdio.h>
// convertion --->>>improper to mixed
int main(){
int N,D,s,x,y,a,b,c; // N=Numerator,D=Denomator
scanf("%d%d",&N,&D); // example:9/4 --->>>2 (1/4)
s=N%D;
x=N-s;
y=x/D;
printf("whole %d\n Numerator %d\n Denomator %d\n",y,s,D);
return 0;
}
Comments
Post a Comment