Advertisement
Guest User

Untitled

a guest
Dec 11th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. program mushrooms;
  2. var input:integer;
  3. output1, output2, output3:real;
  4. begin
  5. readln(input);
  6. if (input mod 2 = 0) then begin
  7. output1 := trunc(input/3.3);
  8. output2 := output1;
  9. end
  10. else begin
  11. output1 := trunc((input-1)/3.3);
  12. output2 := output1+1;
  13. end;
  14. output3 := trunc((output1 + output2)/1.5);
  15. write(output3, ' ', output2, ' ', output1);
  16. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement