Write a program that asks the user to enter a fraction, then reduces the fraction to lowest terms.
寫一個程式 輸入一個分數,約分為最簡分數後輸出
Example input:
6/12
Example output:
1/2
Example input 2:
12/6
2
Hidden content!#include <stdio.h>int main(){* ** * ** ** * * * * * num,denom,n=1,flag,bflag,cflag,dflag;