- Home /
Visual Studio Question
Hi I recently wrote this and made a randomized math quiz with Visual Studio in C# using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace Math_Side_Project
{
class MainClass
{
static void Main(string[] args)
{
Random numberGenerator = new Random ();
int num01 = numberGenerator.Next(1,12);
int num02 = numberGenerator.Next(1,12);
Console.WriteLine("It's Quiz Time!\n");
Console.WriteLine("What is " + num01 + " times " + num02 + "?");
int answer = Convert.ToInt32(Console.ReadLine());
if (answer == num01 * num02){
Console.WriteLine("\nExellent! Your answer is correct.");
} else {
int responseIndex = numberGenerator.Next(1, 4);
switch (responseIndex) {
case 1:
Console.WriteLine("\nAre you even trying?");
break;
case 2:
Console.WriteLine("\nNice try.");
break;
case 3:
Console.WriteLine("\nYou are sooo close!");
break;
default:
Console.WriteLine("\nYou can do better then that");
break;
}
}
Console.ReadKey();
}
}
}
I showed this to my friends and they liked it so I was wondering if I could possibly change the text font or at least make it look neater. Or do I have to use JS or Unity to do that?
that's not a specific unity question.
you could rewrite it in unity and add appropriate visual using the UI/graphics, but you could just as easily do that in windows.
Are you saying I should try to create a new project in unity and copy and paste the code there?
Uhm, not really. That code won't work in Unity as Unity works way different than a console application. What he ment is that UnityAnswers (this site here) is for questions related to development with Unity3d. Your code has nothing to do with Unity at all. You might want to start looking through the Unity Basics if you're interested in learning Unity3d.
Besides that your question is off topic it also has a meaningless title. The title should reflect the actual question and not just a generic title. With that title nobody knows what this is about.
Your answer
![](https://koobas.hobune.stream/wayback/20220612050345im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Changing a GUI Button's font in code 1 Answer
How to measure the width of a string? 0 Answers