Я не буду расписывать всё по разным классам, поэтому человек в одной программе будет только один!!
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("Сертификат") ;
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);
m, n, i, j: integer;
s: real;
a: array[,] of real;
write('Введите S: ');
read(s);
write('Введите M, N: ');
read(m, n);
setlength(a, m + 1, n + 1);
writeln('Введите элементы матрицы: ');
for i := 1 to m do
for j := 1 to n do
read(a[i, j]);
begin
if a[i, j] <> s then
writeln(a[i, j]);
break;
end;
if a[i, j] = s then
writeln('-');
end.
Пример:
Введите S: 7
Введите M, N: 3 4
Введите элементы матрицы:
7 4 3 7
3 5 1 4
7 7 7 7
4
3
-
Объяснение:
нажмите лучших ответ и лайк
Я не буду расписывать всё по разным классам, поэтому человек в одной программе будет только один!!
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);
}
}
m, n, i, j: integer;
s: real;
a: array[,] of real;
write('Введите S: ');
read(s);
write('Введите M, N: ');
read(m, n);
setlength(a, m + 1, n + 1);
writeln('Введите элементы матрицы: ');
for i := 1 to m do
for j := 1 to n do
read(a[i, j]);
for i := 1 to m do
begin
for j := 1 to n do
if a[i, j] <> s then
begin
writeln(a[i, j]);
break;
end;
if a[i, j] = s then
writeln('-');
end;
end.
Пример:
Введите S: 7
Введите M, N: 3 4
Введите элементы матрицы:
7 4 3 7
3 5 1 4
7 7 7 7
4
3
-
Объяснение:
нажмите лучших ответ и лайк