Made this in C#. Still learning. Made through a tutorial from Brackeys.
Thoughts? Will it work? It's something like the captcha when registering on HF.
Code
using System
namespace NumberGenerator
{
class Program
{
static void Main(string[] args)
{
Random numberGenerator = new Random();
int num01 = randomNumberGenerator.Next(1,11);
int num02 = randomNumberGenerator.Next(1,11);
Console.WriteLine("What is " + num01 + " times " + num02 + "?");
int answer = Convert.ToInt32(Console.ReadLine());
if (answer == num01 * num02) {
Console.WriteLine("Well done. Correct!");
} else {
int responseIndex = numberGenerator.Next(1, 4);
switch (responseIndex)
Console.WriteLine("Wrong answer. Refresh the page and try again.");
}
}
}
}Thoughts? Will it work? It's something like the captcha when registering on HF.



