Abcdefghijklm Opqrstuvwxyz-Stringarray

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

1.

A b c d e f g h I j k l m o p q r s t u v w x y z –string array
2. The quick brown fox jumps over the lazy dog – input
3. the quick brown fox jumps over the lazy dog –to lower
4. thequickbrownfoxjumpsoverthelazydog- split , devine array
5. string array nou pt stocare
6. bool result=false
7. se parcurge sirul cu caracterele si sirul gol, daca nu se gaseste se stocheaza, daca se
gaseste se trece mai departe
8. dupa foreach din check si foreach din sirul pt stocare se verifica daca sunt egale si se face
counter ++
9. daca counterul e 26 , result = true
10. print result

using System;
namespace ConsoleApp3
{
class Program
{
static void Main(string[] args)
{
string text = Console.ReadLine();
string check = "abcdefghijklmnopqrstuvwxyz";
string newText = text.ToLower();
string finalText = newText.Replace(" ", "");
int v = 0;
int r = 0;
string stock = string.Empty;

bool result = false;


foreach (char d in check)
{
foreach (char c in finalText )
{
if (c==d)
{
v++;
stock += c;
}
}
}
for( int i=0;i<stock.Length;i++)
{
bool duplicate = false;
for ( int j=i+1;j<stock.Length;j++)
{
if(stock[i]==stock[j])
{
duplicate = true;
break;
}
}
if (duplicate==true)
{
r++;
}
}

if(v-r==26 )
{
result = true;
}
Console.WriteLine( result );
Console.Read();
}

}
}

You might also like