Guest User

Untitled

a guest
Jul 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. int marks[100][100];
  5. int i,j,r,c;
  6.  
  7. printf("Enter row and column number for a 2D array: \n");
  8. scanf("%d %d", &r, &c);
  9.  
  10. for (i=0; i<r; i++){
  11. for (j=0; j<c; j++){
  12. printf("Enter Value at Marks[%d][%d] : ", i,j);
  13. scanf("%d", &marks[i][j]);
  14. }
  15. }
  16.  
  17. printf("\n 2D Values are: \n\n");
  18.  
  19. for (i=0; i<r; i++){
  20. for (j=0; j<c; j++){
  21. printf("%d\t", marks[i][j]);
  22. }
  23. printf("\n");
  24. }
  25.  
  26. return 0;
  27. }
Add Comment
Please, Sign In to add comment