const
n=5;
type
st = array [1..n] of integer;
var
a:array [1..n] of st;
b:st;
i,j,maxp:integer;
begin
for i:=1 to n do
b[i]:=1;
for j:=1 to n do
a[j,i]:=random(20)+1;
b[i]:=b[i]*a[j,i];
end;
maxp:=0;
write(a[i,j]:4);
if i+j>n+1 then
if a[i,j]>maxp then
maxp:=a[i,j];
writeln;
writeln('Максимальное под побочной диагональю: ',maxp);
for i:= 1 to n do
write(b[i],' ');
end.
import tkinter as tk
class Programm(tk.Tk):
def __init__(self):
super().__init__()
self.stat = tk.IntVar()
self.stage = tk.Label(text="Стаж:").grid(row=0,column=1,sticky=tk.W)
self.radio1 =tk.Radiobutton(text="Внештатный", value=1,variable=self.stat)
self.radio2 =tk.Radiobutton(text="Штатный", value=2,variable=self.stat)
self.button=tk.Button(text="Посчитать",command=self.clicked).grid(row=2,columnspan=2)
self.otvet=tk.Label()
self.otvet.grid(row=3,columnspan=2)
self.inputer=tk.Entry(width=10)
self.inputer.grid(row=1,column=1)
self.radio1.grid(row=0,column=0,sticky=tk.W)
self.radio2.grid(row=1,column=0,sticky=tk.W)
def clicked(self):
numb=self.stat.get()
if numb==1:
self.otvet["text"]=str(int(3180*0.8))
elif numb==2:
xp=int(self.inputer.get())
if xp<=10:
self.otvet["text"]=str(int(3180*1.1))
elif 10<xp<30:
self.otvet["text"]=str(int(3180*1.2))
elif 30<=xp:
self.otvet["text"]=str(int(3180*1.3))
if __name__ == "__main__":
app=Programm()
app.resizable(width=False,height=False)
app.mainloop()
const
n=5;
type
st = array [1..n] of integer;
var
a:array [1..n] of st;
b:st;
i,j,maxp:integer;
begin
for i:=1 to n do
begin
b[i]:=1;
for j:=1 to n do
begin
a[j,i]:=random(20)+1;
b[i]:=b[i]*a[j,i];
end;
end;
maxp:=0;
for i:=1 to n do
begin
for j:=1 to n do
begin
write(a[i,j]:4);
if i+j>n+1 then
if a[i,j]>maxp then
begin
maxp:=a[i,j];
end;
end;
writeln;
end;
writeln;
writeln('Максимальное под побочной диагональю: ',maxp);
for i:= 1 to n do
write(b[i],' ');
end.
import tkinter as tk
class Programm(tk.Tk):
def __init__(self):
super().__init__()
self.stat = tk.IntVar()
self.stage = tk.Label(text="Стаж:").grid(row=0,column=1,sticky=tk.W)
self.radio1 =tk.Radiobutton(text="Внештатный", value=1,variable=self.stat)
self.radio2 =tk.Radiobutton(text="Штатный", value=2,variable=self.stat)
self.button=tk.Button(text="Посчитать",command=self.clicked).grid(row=2,columnspan=2)
self.otvet=tk.Label()
self.otvet.grid(row=3,columnspan=2)
self.inputer=tk.Entry(width=10)
self.inputer.grid(row=1,column=1)
self.radio1.grid(row=0,column=0,sticky=tk.W)
self.radio2.grid(row=1,column=0,sticky=tk.W)
def clicked(self):
numb=self.stat.get()
if numb==1:
self.otvet["text"]=str(int(3180*0.8))
elif numb==2:
xp=int(self.inputer.get())
if xp<=10:
self.otvet["text"]=str(int(3180*1.1))
elif 10<xp<30:
self.otvet["text"]=str(int(3180*1.2))
elif 30<=xp:
self.otvet["text"]=str(int(3180*1.3))
if __name__ == "__main__":
app=Programm()
app.resizable(width=False,height=False)
app.mainloop()