Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Osman Zakir
- // 10 / 9 / 2016
- // Introduction to Computer Science
- // Problem Set 1, water.c
- // Ask the user how many minutes they shower for, then print out the
- // equivalent number of water bottles that's worth
- #include <stdio.h>
- #include <cs50.h>
- int main(void)
- {
- printf("minutes: ");
- int minutes;
- minutes = scanf("%d", &minutes);
- int bottles = minutes * 192 / 16;
- printf("bottles: %d\n", bottles);
- return 0;
- }
Add Comment
Please, Sign In to add comment