This problem taught you the basic program structure. You learned how to declare variables with the right type, read input from the user, perform arithmetic operations, and output results.
These are the building blocks for every program you'll write. Input goes into variables, operations transform those variables, and output displays the results.
You also learned about choosing the right data type. I used int because the problem specified integers.
If the problem asked for decimals, you'd use double instead.