Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 #include <stdio.h>
- 2 #include <math.h>
- 3
- 4 int main(void)
- 5 {
- 6
- 7 int test[] = {77,10};
- 8 int x = 2;
- 9 int y = 0;
- 10 int total = 0;
- 11 int new[2];
- 12
- 13 for (int i = 0; test[i] >= 0; i++)
- 14 {
- 15 test[i] = ((test[i] / 3) - 2);
- 16
- 17 if (test[i] > 0)
- 18 {
- 19
- 20 total += test[i];
- 21
- 22 }
- 23
- 24 }
- 25
- 26
- 27
- 28
- 29
- 30
- 31 printf("%d\n", total);
- 32
- 33
- 34
- 35 return 0;
- 36 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement