Darsh, Ratik, Swathy are good friends. They are studying Pre-final year B.E. Electronics and Communication Engineering.
Swathy’s uncle was a maths teacher in a high school.
He requested Swathy to make an application for identifying the greatest number with a numerator and denominator.
You have to contribute for the development of the application. Can you do it?
Input:
The First line of input has two values of type integer representing the the numerator, denominator value of first input
The Second line of input has two values of type integer representing the the numerator, denominator value of second input
Output:
Print the greatest value.
#include <stdio.h> struct fraction { int numerator,denominator; }; int main(){ struct fraction v1; struct fraction v2; scanf("%d%d",&v1.numerator,&v1.denominator); scanf("%d%d",&v2.numerator,&v2.denominator); if(v1.numerator/v1.denominator > v2.numerator/v2.denominator) {printf("%d/%d is greater than %d/%d",v1.numerator,v1.denominator,v2.numerator,v2.denominator);} else{printf("%d/%d is smaller than %d/%d",v1.numerator,v1.denominator,v2.numerator,v2.denominator);} return 0; }
INPUT_1:
12 12
12 22
OUTPUT:
12/12 is greater than 12/22
INPUT_2:
113 131
111 121
OUTPUT:
113/131 is smaller than 111/121
INPUT_3:
24 42
32 53
OUTPUT:
24/42 is smaller than 32/53
INPUT_4:
1 1
2 2
OUTPUT:
1/1 is smaller than 2/2
INPUT_5:
3 4
4 4
OUTPUT:
3/4 is smaller than 4/4
ILLUSTRATION:
Morae Q!
- Find how long will it take till the next fortune year from the current year.
- Find if it’s possible to distribute all the crayons into boxes and satisfy all the conditions.
- Compute sum of numbers using call by reference.
- Compute the amount of money to be handed over with conditions.
- Find the total number of beautiful triplets in the sequence.
- Find the total amount each worker has to pay individually.
- Find the minimum distance between any pair of equal elements in the array.
- Compute the maximum possible value of the given equation.
- Find the age of the student at the time of joining.
- Compute the total number of photos at each restaurant .
- Find the sum of digits of the number using Union datatype.
- Generate the details of the novels in the expected format.
- Sort the student details based on their names in ascending order.
- Find a way to move the king from current position to different square on chessboard.
- Find the time differences in the two different time zones.
- Identifying the greatest number with a numerator and denominator.
- Find the Minimum number of packages to supply all the bases.
- Tower of Hanoi, A puzzle.
- Compute the sum of array of elements using recursion method.
- Find the super digit of an integer using the rules.