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 reminder
- {
- class Program
- {
- public static void SeriesN(string series, int seriesNum, int answer)
- {
- Console.ForegroundColor = ConsoleColor.Blue;
- Console.WriteLine("\nlevel {0}:\n", seriesNum);
- Console.WriteLine(series + "\n");
- Console.Write("what is the next number? ");
- int e = int.Parse(Console.ReadLine()); //בקשת המשך
- if (e == answer)
- {
- Console.ForegroundColor = ConsoleColor.Magenta;//ניצחון
- Console.WriteLine("Good Job.\n");
- }
- else //e=!answer
- {
- Console.ForegroundColor = ConsoleColor.White; //הפסד
- Console.WriteLine("TRY YOUR LUCK IN THE NEXT LEVEL. THE CORRECT ANSWER IS {0} , {1}\n", series, answer);
- }
- Console.ResetColor(); //איפוס צבע
- System.Threading.Thread.Sleep(500);
- Console.WriteLine("\n*******************************************\n");
- Console.ForegroundColor = ConsoleColor.Blue;
- }
- static void Main(string[] args)
- {
- Console.ForegroundColor = ConsoleColor.Green; //צבע פתיחה וגישה
- Console.WriteLine("welcome serias games developed by Omer.");
- Console.ForegroundColor = ConsoleColor.Cyan; //הוראות צבע
- Console.WriteLine("\nfor instractions press 1, don't want instractions press 0.");
- int instractions = int.Parse(Console.ReadLine()); //הוראות
- if (instractions == 1)
- {
- Console.WriteLine("hi, Welcome to serias games.");
- Console.WriteLine("you will recive some numbers, please try to guess the next one.");
- Console.WriteLine("HAVE FUN");
- Console.WriteLine("Just wait few seconds until the game begins.");
- }
- System.Threading.Thread.Sleep(10000);
- Console.Clear();
- System.Threading.Thread.Sleep(1000);
- SeriesN("1 , 2 , 3 , 4", 1, 5);
- SeriesN("2 , 4 , 6 , 8", 2, 10);
- SeriesN("4 , 8 , 16 , 32", 3, 64);
- SeriesN("1 , 3 , 2 , 4 , 3", 4, 5);
- SeriesN("10 , 100 , 1000 , 10000 , 100000", 5, 1000000);
- SeriesN("11 , 9 , 7 , 5 , 3", 6, 1);
- SeriesN("11 , 22 , 33 , 44 , 55", 7, 66);
- SeriesN("15 , 30 , 45 , 60 , 75", 8, 90);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment