Maximum of Two Numbers
Maximum of Two Numbers
EasyBasics44% accepted
Given two integers, find and print the larger one. If they are equal, print either one. This problem teaches you how to compare values using conditional statements — a skill you'll use constantly in programming.
Approach
Given two integers A and B, print the maximum of the two.
Input
3 5
Output
5
More Basics problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards