Помогите перевести код с Pascal на c#
program glas;
uses crt;
type T_str=array[1..10] of string[80];
T_set=set of char;
var s,new: T_str;
alf,gls,sogl: T_set;
kol,i,j,kolg,kolsg,schet:byte;
prom: string;
begin
clrscr;
textcolor(green);
schet:=1;
kolg:=0; kolsg:=0;
alf:=['A'..'Z'];
gls:=['A','E','I','O','U','Y'];
sogl:=['B','C','D','F','G','H','J','K',
'L','M','N','P','Q','R','S','T','V','W','X'];
writeln;

writeln(' Vvedite kol-vo slov(ne > 10 !):');
readln(kol);
writeln;
textcolor(red);
writeln(' VVODIM TOLKO ZAGLAVNIMI !!!');
textcolor(green);
writeln;
for i:=1 to kol do
begin
writeln(' vvod ',i,'-go slova:');
readln(s[i]);
prom:=s[i];
kolg:=0; kolsg:=0;
for j:=1 to length(prom) do
begin
if (prom[j] in gls) then
kolg:=kolg+1
else kolsg:=kolsg+1;
end;
if kolg>kolsg then
begin
new[schet]:=prom;
schet:=schet+1;
end;
end;
clrscr;
writeln;


writeln(' IsHodnii massiv slov:');
writeln;
for i:=1 to kol do
begin
write(' ',s[i]);
end;
readkey;
writeln;writeln;


writeln(' Slova gde > glas.');
writeln;
for i:=1 to schet do
begin
write(' ',new[i]);
end;
readkey;
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.