❔ 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();
} }
} }
12 Replies
THE CODE
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
If your code is too long, post it to: https://paste.mod.gg/
To post C# code type the following:
```cs
// code here
```
Get an example by typing $codegif
in chat
If your code is too long, post it to: https://paste.mod.gg/$codegif
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
If your code is too long, post it to: https://paste.mod.gg/$codegif
cs
on the same line as ```
And since you have everything inside of Main()
, you can just return;
to end the applicationWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.