Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.Design;
- using System.Globalization;
- using System.Net.Http.Headers;
- using System.Reflection;
- using System.Runtime.ConstrainedExecution;
- using System.Security.Cryptography;
- using Microsoft.VisualBasic.CompilerServices;
- namespace SomeExcercises
- {
- class Program
- {
- static void Main(string[] args)
- {
- string text = Console.ReadLine();
- int sum = 0;
- for (int i = 0; i < text.Length; i++)
- {
- if (text[i] == 'a')
- {
- sum += 1;
- }
- else if (text[i] == 'e')
- {
- sum += 2;
- }
- else if (text[i] == 'i')
- {
- sum += 3;
- }
- else if (text[i] == 'o')
- {
- sum += 4;
- }
- else if (text[i] == 'u')
- {
- sum += 5;
- }
- }
- Console.WriteLine(sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment