For this first assignment, you will read a fraction of the form X/Y from the keyboard, reduce it to its lowest form, and print the result. i.e. if the user enters 6/12 your program will print 1/2.

  • When your program is run, it will first print your name and rohan class account number.
  • The name of the program must be p1.c No other filename is acceptable.
  • You must place your file in top level of your account. Check this by typing:
ls -l ~/p1.c
  • If you see a file listing, your source code file has the right name, and is in the right place.
  • Your program must prompt the user to enter a fraction, and then read the input from the keyboard. This information may not be read from the command line as part of the program invocation.
  • Your program should be enclosed in a loop that asks the user if she/he wants to reduce another fraction. Thus, the user should be able to reduce an unlimited number of fractions without re-running
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.