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 P04
- {
- class Program
- {
- static void Main(string[] args)
- {
- double n = double.Parse(Console.ReadLine());
- double chisla = 0;
- double glavniBukvi = 0;
- double malkiBukvi = 0;
- double simvoli = 0;
- for (int i = 0; i < n; i++)
- {
- char m = char.Parse(Console.ReadLine());
- if (char.IsNumber(m))
- {
- chisla += m;
- }
- if (m >= 65 && m <= 90)
- {
- glavniBukvi += m;
- }
- if (m >= 97 && m <= 123)
- {
- malkiBukvi += m;
- }
- if (char.IsSymbol(m))
- {
- simvoli += m;
- }
- }
- Console.WriteLine(chisla);
- Console.WriteLine(glavniBukvi);
- Console.WriteLine(malkiBukvi);
- Console.WriteLine(simvoli);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement