Alex_1324

Untitled

Oct 31st, 2024
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.62 KB | None | 0 0
  1. var
  2.   a : array [1..100] of longint;
  3.   i,n,k,sum,min,nom,max : longint;
  4. begin
  5.   for i:=1 to 7 do
  6.     readln(a[i]);
  7.   max:=a[1];
  8.   for i:=2 to 7 do
  9.     if a[i]>max then
  10.       max:=a[i];
  11.   writeln(max);
  12.     for i:=2 to 7 do
  13.     if a[i]>max then
  14.       max:=a[i];
  15.   if a[1]=a[i] then
  16.     writeln('Monday')
  17.   else if a[2]=a[i] then
  18.     writeln('Tuesday')
  19.   else if a[3]=a[i] then
  20.     writeln('Wednesday')
  21.   else if a[4]=a[i] then
  22.     writeln('Thursday')
  23.   else if a[5]=a[i] then
  24.     writeln('Friday')
  25.   else if a[6]=a[i] then
  26.     writeln('Saturday')
  27.   else if a[7]=a[i] then
  28.     writeln('Sunday');
  29. end.
Advertisement
Add Comment
Please, Sign In to add comment