//Я просто опишу метод записи матрицы const n=100; var ar:array of array of integer; ars:array of array of string; i:integer;
procedure complection(var ar:array of array of integer;var ars:array of array of string); var i,j:integer; begin; for i:=1 to n do begin; for j:=1 to n do begin; ar[i,j]:=random(9); str(ar[i,j],ars[i,j]); end; end; end;
procedure burning(ars:array of array of string); var i,j:integer; t:text; begin; assign(t,'text.txt'); rewrite(t); for i:=1 to n do begin; writeln(t,' '); for j:=1 to n do write(t,ars[i,j],' '); end; end;
begin; randomize; setlength(ar,n+1); setlength(ars,n+1); for i:=1 to n do begin; setlength(ar[i],n+1); setlength(ars[i],n+1); end; complection(ar,ars); burning(ars); end.
Я не буду расписывать всё по разным классам, поэтому человек в одной программе будет только один!!
package com.project;
import java.util.Scanner;
public class Name {
public static int all_marks = 0;
public static int reckoning(int mark) {
return Name.all_marks += mark;
}
public static void diplom(String name) {
if (Name.all_marks > 80) {
System.out.println("Диплом") ;
System.out.println("Награждается: " + name);
System.out.println("За набранное количество в размере: " + Name.all_marks);
}
else if ((Name.all_marks > 50) && (Name.all_marks <= 80)) {
System.out.println("Сертификат") ;
System.out.println("Награждается: " + name);
System.out.println("За набранное количество в размере: " + Name.all_marks);
}
else
System.out.println("Сертификат участника");
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String name;
int num_lessons, marks;
System.out.print("Enter a student's name: ");
name = in.nextLine();
System.out.print("Enter the number of items that are surrendered by a student " + name + ": ");
num_lessons = in.nextInt();
for (int i=1; i<=num_lessons; i++) {
System.out.print("Enter the number of points a student has scored for " + i + " lesson: ");
marks = in.nextInt();
reckoning(marks);
}
diplom(name);
}
}
const n=100;
var ar:array of array of integer;
ars:array of array of string;
i:integer;
procedure complection(var ar:array of array of integer;var ars:array of array of string);
var
i,j:integer;
begin;
for i:=1 to n do
begin;
for j:=1 to n do
begin;
ar[i,j]:=random(9);
str(ar[i,j],ars[i,j]);
end;
end;
end;
procedure burning(ars:array of array of string);
var
i,j:integer;
t:text;
begin;
assign(t,'text.txt');
rewrite(t);
for i:=1 to n do
begin;
writeln(t,' ');
for j:=1 to n do
write(t,ars[i,j],' ');
end;
end;
begin;
randomize;
setlength(ar,n+1);
setlength(ars,n+1);
for i:=1 to n do
begin;
setlength(ar[i],n+1);
setlength(ars[i],n+1);
end;
complection(ar,ars);
burning(ars);
end.