例题
giving an integer N (2<=N<=20) and a real number M (0.5 < M <= 1), output all proper fractions whose numerator is less than N ,and denominator is equal to or less than N, and value is equal to or less than M.
input: an integer N, a real number M in the type of double, in one line seperated by blank space.
output: proper fractions, each occupies a line. The proper fractions with smaller denominators are in the front.
Between two different fractions with same denominator, the one whose numerator is smaller comes first. There is a ‘\n’
after the final fraction number.
#include<stdio.h>
int main() {
int length = 0;
int i, j;