Uploaded by maromans200

Game1

advertisement
using System;
using System.Security.Cryptography;
namespace TestingProject
{
public class Program
{
public static void Main(string[] args)
{
int score = 0;
int guess;
for (int i=0; i < 10; i++)
{
Console.WriteLine("Round " +(i+1)+ " guess the number between 1 and 10");
int randomNumber = RandomNumberGenerator.GetInt32(1, 11);
guess= Convert.ToInt32(Console.ReadLine());
if (guess == randomNumber)
{
Console.WriteLine("Correct! You've got it!");
}
else
{
Console.WriteLine("Sorry, Thats not correct.");
}
}
Console.WriteLine("Your score is "+ score + " out of 5");
}
}
}
Download