Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp117._11._2017_01
- {
- class Program
- {
- static void Main(string[] args)
- {
- Random rnd = new Random();
- int guess, aim, diff;
- aim = rnd.Next(0, 1000);
- Console.WriteLine("Wilkommen zum revolutionären Ratespiel: Stephan's Ratespiel.");
- do
- {
- guess = Convert.ToInt16(Console.ReadLine());
- Console.WriteLine("Deine Zahl ist: " + guess);
- if (aim < guess)
- {
- diff = guess - aim;
- Console.WriteLine("Damit liegst du um zu hoch.");
- }else if(aim > guess)
- {
- diff = aim - guess;
- Console.WriteLine("Damit liegst zu niedrig.");
- }
- else
- {
- Console.WriteLine("SUPER! Du hast es erraten!");
- }
- } while (guess != aim);
- }
- }
- }
Add Comment
Please, Sign In to add comment