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;
- namespace ConsoleApplication22
- {
- class Program
- {
- static bool EsteVocala(char s)
- {
- if ((s == 'a') || (s == 'e') || (s == 'i') || (s == 'o') || (s == 'u'))
- return true;
- else return false;
- }
- static void Main(string[] args)
- {
- string s1=Console.ReadLine(), s2=Console.ReadLine();
- if (s1.Length == s2.Length)
- {
- bool text=true;
- for (int i = 0; i < s1.Length; i++)
- {
- if (((EsteVocala(s1[i])) && (!EsteVocala(s2[i]))) || ((!EsteVocala(s1[i])) && (EsteVocala(s2[i]))))
- text = false;
- }
- if (text)
- Console.WriteLine("Cuvintele au aceeasi textura.");
- else Console.WriteLine("Cuvintele nu au aceeasi textura.");
- }
- else Console.WriteLine("Cuvintele nu au aceeasi textura.");
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement