using System.Collections.Generic;
public static class Tools
private static Random RandomGenerator = new Random(Guid.NewGuid().GetHashCode());
public static int GetRandomInteger(int minimum, int maximum)
return RandomGenerator.Next(minimum, maximum + 1);
public static void Write(string text = "")
public static void WriteLine(string text = "")
public static string AskForString(string prompt = "")
Console.WriteLine(prompt);
return Console.ReadLine();
public static int AskForInt(string prompt = "")
string textEntered = AskForString(prompt);
return int.Parse(textEntered);
public static double AskForDouble(string prompt = "")
string textEntered = AskForString(prompt);
return double.Parse(textEntered);
public static void Main()
int pointAfterPoints = 1;
int numTouchdowns = Tools.AskForInt("How many touchdowns were scored?");
int numPointAfter = Tools.AskForInt("How many point afters were scored?");
int numFieldGoals = Tools.AskForInt("How many field goals were scored?");
int touchdownTotal = touchdownPoints * numTouchdowns;
int pointAfterTotal = pointAfterPoints * numPointAfter;
int fieldGoalTotal = fieldGoalPoints * numFieldGoals;
int totalScore = touchdownTotal + pointAfterTotal + fieldGoalTotal;
Tools.WriteLine("The total score is " + totalScore);