Greatest of three numbers
Rahul is entering three numbers into the system. He has to find the biggest number from that
inputs. Help rahul to find the biggest number.
Input: Get three integers of positive as well as negative numbers.
Output: Print the greatest integer.
Sample Input :
i0
20
30
Sample Output :
30
#include <iostream> using namespace std; int main() { int x,y,z; cin>>x>>y>>z; if((x>=y) && (x>=z)) cout<<x; else if((y>=z) && (y>=x)) cout<<y; else cout<<z; return 0; }
Input_1:
10
20
30
Output:
30
Input_2:
100
200
100
Output:
200
Input_3:
56
65
23
Output:
65
Illustration of the Output:
More Q
- Determine if a person could attend all meetings in given interval times.
- Find the volume of a volley ball
- Find the maximum score obtained at the end of colour chess grid game.
- Find the number of pairs if positive integers with condition is even.
- Return the largest subset such that every pair meets the given condition.
- Find the number of index triplets that satisfy given condition.
- Handling multiple queries using array – sum, update, range.
- Find all the sequences that occur more than once in DNA molecule.
- Find the biggest number.
- Sum of cube of each number is again equal to the number then it is an Armstrong number.
- Hello World.
- Calculate the Cube Root.
- Find the count of consecutive 1’s present in array.
- Return an array with athletes relative ranks according to the score.
- Return a string of its base 7 representation.
- Return kth largest element in sorted order.
- Find all repeated elements in the array.
- Find atleast one duplicate number in the array.
- Find the maximum result of = a XOR b.