Please tell me logic of this program without using structures.

Problem: given a no exp:3 you should display all combination of unique fractions in ascending order like as shown in example

EXP:

input: 3

o/p:1/3 1/2 2/3 1/1

hint:convertion Logic to convert the floating point no to fraction(numerator/denominator) format without using structures.

examples:

0.2 can be converted to 1/5 format

.5 can be conveted to the 1/2 format

2/3 can be conveted to the .667