PRF192_-_FA_2023_-_PE_937.webp
S

PRF192_-_FA_2023_-_PE_937.webp


(1 mark, file to be edited: Q1.c)
Given two fractions, your task is to check if the values of the two fractions are equivalent or not.
Two integers A and B are represent for the first fraction.
Two integers C and D are represent for the second fraction.
For example,
Even if the first fraction is 5/10 and the second fraction is 1/2, so the result is "the same".
Even if the first fraction is 15/-20 and the second fraction is -18/24, so the result is "the same".
Even if the first fraction is 7/9 and the second fraction is 5/1, so the result is "difference".
Input
Users are required to enter a 4 integers A, B, C, D (-1000 ≤ A, B, C, D ≤ 1000) using the keyboard (STDIN).
Output
Please print out the checking result.
Sample
Below is an example of how the program will run:
Sample 1
Input
Output
15 -2018 24
the same
Sample 2
Input
795 1
Output
difference

Thông tin

Category
PRF192
Thêm bởi
silver_moon
Ngày thêm
Lượt xem
3,585
Lượt bình luận
1
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom