fork download
  1. int main()
  2. {
  3. int n;
  4. printf("Enter the number n<10:\n");
  5. scanf("%d",&n);
  6.  
  7. int i, j;
  8. for(i=1;i<=n;i++)
  9. {
  10. for(j=1;j<=n;j++)
  11. {
  12. printf("(%d,%d) ",i, j);
  13. }
  14. printf("\n");
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 2012KB
stdin
5
stdout
Enter the number n<10:
(1,1) (1,2) (1,3) (1,4) (1,5) 
(2,1) (2,2) (2,3) (2,4) (2,5) 
(3,1) (3,2) (3,3) (3,4) (3,5) 
(4,1) (4,2) (4,3) (4,4) (4,5) 
(5,1) (5,2) (5,3) (5,4) (5,5)