Aayvu.com
0
Q:

if inside if c#

string emotions;
emotions = Console.ReadLine();
//for emotions say the user input was either
//happy,sad and mad
if (emotions == "happy")
{
  Console.Write("You are happy");
}
else if (emotions == "sad")
{
    Console.Write("You are sad");
}
else if (emotions == "mad")
{
    Console.Write("You are mad");
}
else
{
    Console.Write("Unknown input");
}
1
if (condition)
{
  print("Yes");
}
else
{
  print("No");
}
2
int Test1 = 1;
int Test2 = 1;

if (Test1 = 1)
{
  if (Test2 = 1)
  {
  Console.WriteLine("This is the up Answer.");
  }
  Console.WriteLine("This is the down Answer.");
  
}

//END HERE
//THIS IS CODE FOR C#
  
0
if((number > 10) || (number < 0))    Console.WriteLine("Hey! The number should be 0 or more and 10 or less!");else    Console.WriteLine("Good job!");
-2

New to Communities?

Join the community