Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int namta_10[10][10];
- int row, col, res1, res2 = 0, even = 0, odd = 0;
- for(row = 1; row <= 10; row++)
- {
- res1 = 0;
- for(col = 1; col <= 10; col++)
- {
- res1 = res1 + row;
- namta_10[row - 1][col - 1] = res1;
- printf("%d x %d = %d\n", row, col, namta_10[row - 1][col -1]);
- res2 = res2 + namta_10[row - 1][col -1];
- if(namta_10[row - 1][col -1] % 2 == 0)
- {
- even++;
- }
- else
- {
- odd++;
- }
- }
- printf("\t");
- }
- printf("Total summation is= %d\n", res2);
- printf("Total number even number is= %d\n", even);
- printf("Total number of odd number is= %d\n", odd);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment