Menu
Coddy logo textTech

Max number

Lesson 2 of 20 in Coddy's Beginner Challenges - Practice Basic Concepts course.

challenge icon

Challenge

Easy

Write a function named max that receives two numbers as input and returns the bigger number among the two.

For example, let's assume the input is 132 and 154. The function should return 154 because it is bigger than 132.

Try it yourself

int findMax(int n1, int n2) {
    // Write code here
}

All lessons in Beginner Challenges - Practice Basic Concepts