Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define YEAR 2
- #define MONTH 5
- int main()
- {
- int y,m,total;
- int weather[YEAR][MONTH] = {{1,2,3,4,5},{6,7,8,9,10}};
- int y_weather[YEAR]={0};
- int m_weather[MONTH]={0};
- for(y=0;y<YEAR;y++)
- {
- for(m=0;m<MONTH;m++)
- {
- m_weather[m] = m_weather[m]+weather[y][m];
- }
- printf("m_weather[%d] is %d\n",m,m_weather[m]);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement