Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int a,
- b = 1000,
- c,
- d,
- f;
- ///////////////////////////////////////////////////////////////////////////
- int main() //
- {
- printf("Books: ");
- scanf ("%d", &a);
- d = a % 7;
- f = a / 7;
- for(int for_a = 0; for_a < f; for_a++)
- {
- for(int for_b = 0, b = 1000; for_b < 7; for_b++, b -= 55)
- {
- c += b;
- }
- }
- b = 1000;
- for(int for_a = 0; for_a < d; for_a++, b -= 55)
- {
- c += b;
- }
- printf("%d\n", c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement