giving the numerator and dominator */voidprintfrac(longn,longd){if(d==0){printf("Inf");return;}/* record the sign and make them positive */intinegative=1;if(n<0){n=-n;inegative*=-1;}if(d<0){d=-d