vasavto1
?>

Рассуждай логически: 5_6+6+*-45=1900

Информатика

Ответы

twisty20075004
5_6+6=-85500
5_6=-85506
Тут ничего не получится по идее.
nastyakrokhina87
1. "Школьное" решение

// PascalABC.NET 3.0, сборка 1073
const
  sb='bcdfgjklmnpqrstvwxz';
  s='Computer programming is a process of computer programs creation';
var
  i,n:integer;
  s1,sn,t:string;
begin
  i:=1;
  while s[i]<>' ' do Inc(i);
  s1:=Copy(s,1,i-1);
  n:=Length(s); i:=n;
  while s[i]<>' ' do Dec(i);
  sn:=Copy(s,i+1,n-i);
  t:='';
  for i:=1 to Length(s1) do
    if Pos(s1[i],sb)>0 then t:=t+s1[i];
  s1:=t;
  t:='';
  for i:=1 to Length(sn) do
    if Pos(sn[i],sb)>0 then t:=t+sn[i];
  sn:=t;
  t:='';
  for i:=1 to Length(s1) do
    if Pos(s1[i],sn)>0 then
      if Pos(s1[i],t)=0 then t:=t+s1[i];
  for i:=1 to Length(t) do Write(t[i],' ');
  Writeln
end.
 
Тестовый прогон:
t r

2. "Нормальное" решение

// PascalABC.NET 3.0, сборка 1073
const
  sb='bcdfgjklmnpqrstvwxz';
  s='Computer programming is a process of computer programs creation';
begin
  var a:=s.ToWords(' ');
  a[0].Intersect(a[a.Length-1]).Where(x->Pos(x,sb)>0).Println(',')
end.

Тестовый прогон:
t,r
Naumenkova-Ivanov
  present simple общие does he go to school every day? does she really like singing? is it cold today? do cats catch mice? has he got a real friend? альтернативные does she go to shool every day or once a month? do cats catch mice or dogs? is the earth round or square? is russia bigger or smaller than other countries? does he like skiing or skating? специальные what does he do at school every day? who likes dancing? when does winter come? where does she live? what does she always wait for? present progressive общие is it raining now? is the sun shining at the moment? is he writing his composition now? are they swimming in the pool at the moment? are you doing your homework? альтернативные are you doing your homework or watching tv now? is it raining or snowing now? are they flying to italy or to canada now? is he reading a book or a web-page? is she clever or not? специальные what is she looking forward for? where are they going to go next summer? when is he leaving for france? whom is she writing an e-mail? what are they doing now?

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Рассуждай логически: 5_6+6+*-45=1900
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

BirUlek215
seymurxalafov05
Lomakina-Valerievna1779
zapros
jenko87
Елена-Семенова
machkura
missbuhgalter2013
lobutev
angelina-uj1350
info46
Sergeevich-irina
Yurevna_Kharkchinov1302
yok887062
alexandrxzx09