from tkinter import*
programm=Tk()
programm.resizable(height=False, width=False)
def clicked():
if input.get()=="20":
txt="22000"
elif int(input.get())<10:
txt="8000"
else: txt="20000"
label2["text"]=txt
programm.title("ЗП")
label1=Label(programm,text="Введите кол-во дней:").grid(row=0,column=0)
input=Entry()
input.grid(row=0,column=1)
button= Button(programm, text="Посчитать", command=clicked,width=40).grid(row=1,columnspan=2)
label2=Label(programm, text="")
label2.grid(row=2,columnspan=2)
programm.mainloop()
program m1;
var a,b,c,:integer;
help:string;
begin
b:=0;
for var i:=2848 to 109499 do
str(i,help);
if pos('9',help)<>0 then
c := 0;
a:=i;
while a > 0 do
if a mod 10 > 5 then
c := c + a mod 10;
end;
a := a div 10;
if c mod 3 = 0 then
b:=b+1;
if pos('8',help)=1 then
writeln(i);
writeln(b);
end.
Объяснение:
20865 89997
from tkinter import*
programm=Tk()
programm.resizable(height=False, width=False)
def clicked():
if input.get()=="20":
txt="22000"
elif int(input.get())<10:
txt="8000"
else: txt="20000"
label2["text"]=txt
programm.title("ЗП")
label1=Label(programm,text="Введите кол-во дней:").grid(row=0,column=0)
input=Entry()
input.grid(row=0,column=1)
button= Button(programm, text="Посчитать", command=clicked,width=40).grid(row=1,columnspan=2)
label2=Label(programm, text="")
label2.grid(row=2,columnspan=2)
programm.mainloop()
program m1;
var a,b,c,:integer;
help:string;
begin
b:=0;
for var i:=2848 to 109499 do
begin
str(i,help);
if pos('9',help)<>0 then
begin
c := 0;
a:=i;
while a > 0 do
begin
if a mod 10 > 5 then
begin
c := c + a mod 10;
end;
a := a div 10;
end;
if c mod 3 = 0 then
begin
b:=b+1;
if pos('8',help)=1 then
begin
writeln(i);
end;
end;
end;
end;
writeln(b);
end.
Объяснение:
20865 89997