Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. program ChapterCal;
  2. uses crt;
  3.  
  4. var
  5. total, current, week : integer;
  6.  
  7. begin
  8. week := 1;
  9. writeln('Enter number of starting chapters');
  10. readln(current);
  11. clrscr;
  12. total := current;
  13. repeat
  14. begin
  15. if (week = 2) then
  16. begin
  17. total := total + 1;
  18. week := 1;
  19. end
  20. else
  21. begin
  22. total := total + 1;
  23. current := current - 1;
  24. week := 2;
  25. end
  26. end
  27. until current = 0;
  28. writeln(total);
  29. readln();
  30. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement