Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include "data.h"
- int SumStorage[50] = {0};
- int main()
- {
- printf("Summing all the columns\n");
- int col,row;
- for (col = 49; col >= 0; col--)
- {
- for (row = 49; row >= 0; row--)
- {
- SumStorage[col] += (data[col][row] - '0');
- }
- }
- int index, power = 0;
- for (index = 49; index >=0; index--)
- {
- printf("SumStorage[%i] = %i, %i mod 10 is %i, remainder is %i\n", index, SumStorage[index], SumStorage[index], (SumStorage[index] % 10), (int)SumStorage[index]/10);
- power++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement