Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program ChapterCal;
- uses crt;
- var
- total, current, week : integer;
- begin
- week := 1;
- writeln('Enter number of starting chapters');
- readln(current);
- clrscr;
- total := 0;
- repeat
- begin
- if (week = 2) then
- begin
- total := total + 1;
- week := 1;
- end
- else
- begin
- total := total + 1;
- current := current - 1;
- week := 2;
- end
- end
- until current = 0;
- writeln();
- writeln(total);
- readln();
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement