Solução: Problema do giro da palavra (Cleber Pinelli)
From AdonaiMedrado.Pro.Br
Revision as of 23:43, 7 April 2009 by 200.17.147.2 (Talk) (New page: <code lang="csharp"> using System; namespace aula1 { public class Giro { public Giro() { string l1 = Console.ReadLine(); string l2 = Console.ReadLine(); int saida = ...)
using System; namespace aula1 { public class Giro { public Giro() { string l1 = Console.ReadLine(); string l2 = Console.ReadLine(); int saida = 0; for(int i=0; i<l1.Length;i++){ l1 = Rotaciona(l1); if(l1.Equals(l2)){ saida = 1; break; } } Console.WriteLine(saida); } public string Rotaciona(string l){ string x; x = l.Substring(1,l.Length-1)+l[0]; return x; } } }