Challenge: Integer Operations
Tarefa
Swipe to start coding
Write a program that does the following:
- Hardcode two integers in your program.
- Add the two integers.
- Print the sum to standard output.
- If the sum overflows the range of a 32-bit signed integer, print Warning: Integer overflow instead of the sum.
The entry point is the main method of the Main class in the com.example package.
Notes:
- Do not use any input functionality.
- The valid range for a 32-bit signed integer is from -2147483648 to 2147483647.
Solução
solution.java
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 3
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Awesome!
Completion rate improved to 7.14
Challenge: Integer Operations
Deslize para mostrar o menu
Tarefa
Swipe to start coding
Write a program that does the following:
- Hardcode two integers in your program.
- Add the two integers.
- Print the sum to standard output.
- If the sum overflows the range of a 32-bit signed integer, print Warning: Integer overflow instead of the sum.
The entry point is the main method of the Main class in the com.example package.
Notes:
- Do not use any input functionality.
- The valid range for a 32-bit signed integer is from -2147483648 to 2147483647.
Solução
solution.java
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 3
single