Desafio: If, Else-If, Else
Escreva uma condição para verificar se a variável x
está no intervalo numérico de 70 a 90 (incluindo 70 e 90). Se estiver no intervalo, exiba a mensagem "In Range
", caso contrário, exiba "Not In Range
".
main.cs
123456789101112131415161718192021using System; namespace ConsoleApp { class Program { static void Main(string[] args) { int x = 77; if (___) { ___ } ___ { ___ } } } }
Modifique os valores na expressão 0 <= value && value <= 100
para formar a expressão condicional.
main.cs
123456789101112131415161718192021using System; namespace ConsoleApp { class Program { static void Main(string[] args) { int x = 77; if (70 <= x && x <= 90) { Console.WriteLine("In Range"); } else { Console.WriteLine("Not In Range"); } } } }
Obrigado pelo seu feedback!
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Can you show me how to modify the expression for the range 70 to 90?
What would the full conditional statement look like for this range?
Can you explain why both 70 and 90 are included in the range?
Awesome!
Completion rate improved to 1.59
Desafio: If, Else-If, Else
Deslize para mostrar o menu
Escreva uma condição para verificar se a variável x
está no intervalo numérico de 70 a 90 (incluindo 70 e 90). Se estiver no intervalo, exiba a mensagem "In Range
", caso contrário, exiba "Not In Range
".
main.cs
123456789101112131415161718192021using System; namespace ConsoleApp { class Program { static void Main(string[] args) { int x = 77; if (___) { ___ } ___ { ___ } } } }
Modifique os valores na expressão 0 <= value && value <= 100
para formar a expressão condicional.
main.cs
123456789101112131415161718192021using System; namespace ConsoleApp { class Program { static void Main(string[] args) { int x = 77; if (70 <= x && x <= 90) { Console.WriteLine("In Range"); } else { Console.WriteLine("Not In Range"); } } } }
Obrigado pelo seu feedback!