Challenge: Basic Exception Handling
Tarefa
Swipe to start coding
Practice handling exceptions in C# by writing a function to divide two numbers. This builds on your understanding of what exceptions are and how they can occur during program execution.
- Throw a
DivideByZeroExceptionwith an appropriate message if the denominator is zero. - Return the result of dividing numerator by denominator if the denominator is not zero.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 2
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 4.17
Challenge: Basic Exception Handling
Deslize para mostrar o menu
Tarefa
Swipe to start coding
Practice handling exceptions in C# by writing a function to divide two numbers. This builds on your understanding of what exceptions are and how they can occur during program execution.
- Throw a
DivideByZeroExceptionwith an appropriate message if the denominator is zero. - Return the result of dividing numerator by denominator if the denominator is not zero.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 2
single