Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #define colmax 10
  4. #define rowmax 12
  5. int main()
  6. {
  7. int i,j,sum=1;//initializing variables
  8.  
  9. for(i=1;i<=rowmax;i++)//this iterates rows from 1 to 12
  10. {
  11.  
  12. for(j=1;j<=colmax;j++)//this iterates colums from 1 to 10 everytime
  13. {
  14. sum=i*j;//and this multiplies all iterated elements to row number
  15. printf("|%4d",sum);//printing the iterated and multiplied elements
  16.  
  17. }
  18. printf("\n");
  19. printf("------------------------------------------------------|");
  20. printf("\n");
  21. }
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement