Вот: 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.
Using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace pzn {
class Program { public static void Main(string[] args) { int x = Convert.ToInt32(Console.ReadLine()); int y = Convert.ToInt32(Console.ReadLine()); int temp; if (x<y) { x ^= y; y ^= x; x ^= y; } Console.WriteLine("x={0}, y={1}", x, y); Console.ReadKey(); } } }
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку