Hello, I’m working on this task:
Write a program that says “Hello, enemy” if it is a machine OR is dangerous; otherwise, have it say “Hello, Teo.” Change the bool variable values for the program to output “Hello, Teo.”
Here is my code:
using System;
namespace Booleans
{
class Salutation
{
static void Main(string[] args)
{
string hello = "Hello, Teo ";
bool isMachine = true;
bool isDangerous = true;
if (isMachine || isDangerous)
{
hello = hello + "enemy.";
}
else
{
// Add "Teo." to hello
}
Console.WriteLine(hello);
}
}
}
Can anyone please help me to solve it?