Вот: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 const n=5; var a: array[1..n,1..n] of integer; i,j,s: integer; begin s: =0; randomize; for i: =1 to n do begin for j: =1 to n do begin a[i,j]: =random(10); write(a[i,j]: 4); if (i+j) mod 3=0 then s: =s+a[i,j]; end; writeln; end; writeln('s=',s); end.
1) файл паскаля приложен. 2) код на c# static void Main(string[] args) { int a, b; a = Convert.ToInt32(Console.ReadLine()); b = Convert.ToInt32(Console.ReadLine()); if (a > 2) { Console.WriteLine(a / 2); Console.WriteLine(b - 1); } } 3) Код на vb dim a as integer = 0 dim b as integer = 0 a = cint(console.readline()) b = cint(console.readline()) if a > 2 then console.writeline( a / 2) console.writeline(b - 1) end if
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку