Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void)
- {
- int num[5][6] = {0};
- int i,j,cnt=1;
- for(i=0;i<4;i++)
- {
- for(j=0;j<5;j++)
- {
- num[i][j]=cnt++;
- num[i][5]+=num[i][j];
- num[4][j]+=num[i][j];
- num[4][5]+=num[i][j];
- }
- }
- i=0;
- while(i<5)
- {
- j=0;
- while(j<6)
- {
- printf("%3d ",num[i][j]);
- j++;
- }
- printf("\n");
- i++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement