Jater

Nikita_listed_type

Nov 27th, 2012
83
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type
  2.     month = (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec);
  3. var
  4.     k: 1..366;
  5.     d: 1..31;
  6.     m: month;
  7.     m1:1..12;
  8.     i: integer;
  9. begin
  10.     Write('day month: ');
  11.     ReadLN(d,m1);
  12.     k:=1;
  13.     for m:=Jan to Dec do
  14.     begin
  15.         case m of
  16.             Jan: k:=k+0;
  17.             Mar, May, Jul, Aug, Oct, Dec: k:=k+31;
  18.             Apr, Jun, Sep, Nov: k:=k+30;
  19.             Feb: k:=k+29;
  20.         end;
  21.     if ord(m)=m1-1 then break;
  22.     end;
  23. Writeln('Poryadkovyi nomer dnya: ',k+d-1);
  24. readln;
  25. End.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×