Advertisement
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 BgColorConsole
- {
- class BgColorConsole
- {
- static void Main(string[] args)
- {
- string str = Console.ReadLine();
- char[] charAray = str.ToCharArray();
- foreach (var item in charAray)
- {
- if (item >= 1040 && item <= 1103)
- {
- ConsoleColor fontcolor = ConsoleColor.Red;
- Console.ForegroundColor = fontcolor;
- Console.Write(item);
- }
- else if (item < 1040 || item > 1103)
- {
- ConsoleColor fontcolor = ConsoleColor.Yellow;
- Console.ForegroundColor = fontcolor;
- Console.Write(item);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement