Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <cs50.h>
- int main(void)
- {
- int n;
- int m;
- //check the positive number of minutes
- do
- {
- printf("How many minutes did you take shower? \n");
- n = get_int();
- }
- while (n < 0);
- //counting bottles
- m = n * 12;
- printf("%i minutes \n%i bottles of water\n", n, m);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement