====== HW 01 - Reducing fractions ====== Write a simple program that: * reads a fraction from the standard input, * then [[https://en.wikipedia.org/wiki/Irreducible_fraction | simplifies]] it, * and finally prints the simplified fraction to the standard output. Hint: take a look at the [[https://en.wikipedia.org/wiki/Greatest_common_divisor|GCD]] and find an algorithm to compute it. Some examples of the program behaviour when called as ./simplify. The first line is the input, the second is output. $ ./simplify 2 / 4 1 / 2 $ ./simplify 765 / 918 5 / 6 $ ./simplify 101 / 100 101 / 100 You can find more testing instances {{ :courses:be5b99cpl:hw:hw1_public.zip |here}}. Files with the suffix ''.in'' contain your input with ''.out'' your desired output. When you have your input in a file, e.g. ''1.in'' containing 768 / 918 you can pass it to your program in the bash like $ cat in.txt | ./simplify 15 / 18 Upload your solution into [[https://cw.felk.cvut.cz/brute/|BRUTE]] as a zip archive containing only the file ''simplify.c'' with your program. This program will have to be simply compilable by calling ''clang simplify.c -o simplify''.