Equal Words
Здравейте колеги не мога да си обясня защо не мога да я излъжа тая програма.Като напиша 2 еднакви инена няма проблем hello hello yes ми изписва като кажа SoftUni SoftUNi пак казва вярно е но когато кажа примерно водка и Бира казва пак че е вярно а не е !!!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EqualWords
{
class EqualWords
{
static void Main(string[] args)
{
var text1 = Console.ReadLine();
var text2 = Console.ReadLine();
String word = text1 + text2;
if (word.Equals(text1 + text2 )) // 80 % prodalji !!!
{
Console.WriteLine("Yes");
}else
Console.WriteLine("No");
}
}
}
Аз успях да излъжа Judge с .Length :D Ама, по-добре е така:
using System;
namespace EqualWords
{
class Program
{
static void Main()
{
string firstWord = Console.ReadLine().ToLower();
string secondWord = Console.ReadLine().ToLower();
if (firstWord == secondWord)
{
Console.WriteLine("yes");
}
else
{
Console.WriteLine("no");
}
}
}
}