Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Въведете израза:");
- string t = Console.ReadLine();
- if (Scobi(t)) Console.WriteLine("Правилно");
- else Console.WriteLine("Неправилно");
- }
- }
- }
- using System;
- namespace ConsoleApp1
- {
- //Comma
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Въведете текст - не повече от 255 знака");
- string s = Console.ReadLine();
- int br = 0;
- for (int i = 0; i < s.Length; i++) if ( s [i] == ',') br++;
- Console.Write("Знакът ',' се среща в теста "br+" пъти");
- }
- }
- }
- using System;
- namespace ConsoleApp1
- {
- //Prb???
- class Program
- {
- static int Brar(string d, string s)
- {
- int i = s.IndexOf(d);
- if (i == -1) return 0;
- else return 1 + Brar(d, s.Substring(i + 1));
- }
- public static void Main()
- {
- Console.Write("Въведете текст - не повече от 255 знака!");
- string t = Console.ReadLine();
- int L = t.Length;
- Console.Write("Въведете сума:");
- string d = Console.ReadLine();
- int k = 0; int br = 0; string pd;
- do
- {
- Ottdduma(t, ref k, out pd);
- if (pd.CompareTo("")!0) Console.WriteLine("Пор дума:" + pd);
- if (d.CompareTo(pd) == 0) Console.WriteLine(">>" + (++br) + ">>");
- }
- while (k < L);
- Console.WriteLine("Брой срещания на "+d+" в текста е:" +br);
- }
- }
- }
- using System;
- namespace ConsoleApp1
- {
- //Prb???
- class Program
- {
- public static void Main()
- {
- int[] a = new int[256 * 256]; char c;
- Console.Write("ВЪВЕДИ ТЕКСТ:"); string s = Console.ReadLine();
- for (c = 'А'; c <= 'я'; c++) a[c] = 0;
- for (int i = 0; i < s.Length; i++) a[s[i]]++;
- for (c = 'А'; c <= 'я'; c++)
- if (a[c] != 0) Console.WriteLine(c+":"+a[c]);
- }
- public static void Main()
- {//Nidex - Брои всички знакове
- int[] a = new int[256 * 256]; char c;
- Console.Write("ВЪВЕДИ ТЕКСТ:"); string s = Console.ReadLine();
- for (c = char.MinValue; c < char.MaxValue; c++) a[c] = 0;
- for (int i = 0; i < s.Length; i++) a[s[i]]++;
- for (c = char.MinValue; c < char.MaxValue; c++)
- if (a[c] != 0) Console.WriteLine(c + ":" + a[c]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment