const
n= 5;
var
i,j,max: integer;
a: array [1..5,1..5] of integer;
begin
for i:=1 to n do begin
for j:=1 to n do begin
a[i,j]:= random(10);
write(a[i,j],' ')
end;
writeln
end;
max:= a[n,1];
for i:=1 to n do
if a[i,n-i+1]>max then max:=a[i,n-i+1];
writeln(max)
<span>end.</span>
using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
namespace ConsoleApp12
{
class Program
{
static void Main(string[] args)
{
var x = new List<int>();
for (int i = 0; i < 5; i++)
x.Add(int.Parse(ReadLine()));
WriteLine("imax="+(x.IndexOf(x.Max())+1).ToString()+"; imin="+(x.IndexOf(x.Min())+1).ToString());
ReadKey();
}
}
}
<span>1)
#include <stdio.h>
int main() {
int a = -1;
while(a != 0)
scanf("%d", &a);
}
2)
<span>#include <stdio.h>
#include <math.h>
int main() {
int a;
scanf("%d", &a);
int prime = 1;
for(int i = 2; i <= sqrt(a)+1; i++)
if(a%i == 0) {
prime = 0;
break;
} if((prime == 0 && a != 2) || a == 1) printf("NO\n");
else printf("YES\n");
}
</span>3)
#include <stdio.h>
int main() {
int a[5];
for(int i = 0; i < 5; i++)
scanf("%d", &a[i]);
for(int i = 0; i < 5; i++)
printf("%d ", a[i]);
printf("\n");
}</span>
Вот, сам для тебя сделал, но только на 7 страниц