ilycryst
ilycryst
CC#
Created by ilycryst on 1/16/2023 in #help
❔ Ending the cmd if answer FOR Q1 is wrong, can't do it myself im new.
// Maths game for Addition :D + ++ +++ using System.Reflection.Metadata.Ecma335; using System.Security.Cryptography; internal class Program { private static void Main(string[] args) { int age; int A1; Console.WriteLine("Hello!"); Console.WriteLine("\n What is your age?"); age = Convert.ToInt32(Console.ReadLine()); if (age == 3) Console.WriteLine("\nLet's start"); if (age == 4) Console.WriteLine("\nLet's start"); if (age == 5) Console.WriteLine("\nLet's Start"); if (age == 6) Console.WriteLine("\nLet's Start"); if (age == 7) Console.WriteLine("\nLet's Start"); Console.WriteLine("\n89 + 72?"); A1 = Convert.ToInt32(Console.ReadLine()); if (A1 == 162) { Console.WriteLine("\nCorrect!"); } else if (A1 > 162) { Console.WriteLine("\nYou're wrong, rerun the program to try again!"); } else if (A1 < 162) { Console.WriteLine("\nYou're wrong, rerun the program to try again!"); } int A2; Console.WriteLine("\n65 + 72?"); A2 = Convert.ToInt32(Console.ReadLine()); if (A2 == 137) { Console.WriteLine("\nCorrect!"); } else if (A2 > 137) { Console.WriteLine("\nYou're wrong, rerun the program to try again"); } else if (A2 < 137) { Console.WriteLine("\nYou're wrong, rerun the program to try again"); } _ = Console.ReadKey();
} }
17 replies
CC#
Created by ilycryst on 1/13/2023 in #help
I don't really know what's the issue here? I'm am A RLLY NEW C# learner so maybe you guys can help?
8 replies