---
title: "Discussion on \"C program to input a matrix from the user and find the row sum and the column sum.\" | Hashnode"
description: "Discussion on \"C program to input a matrix from the user and find the row sum and the column sum.\". This program inputs a matrix from the user and then uses the \"i\" and \"j\" value from the for loop to choose the element from the matrix and add them.\n\nfor(int i=0;i<m;i++)\n{\nint csum=0;\nfor(int j=0;j<n;j++)\n{\ncsum=csum+arr[j][i];\n}\nprintf(\"\\nSum of al..."
url: "https://hashnode.com/posts/c-program-to-input-a-matrix-from-the-user-and-find-the-row-sum-and-the-column-sum/65ed4e489a0f5ca160b69270"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [C program to input a matrix from the user and find the row sum and the column sum.](https://gagang.hashnode.dev/c-program-to-input-a-matrix-from-the-user-and-find-the-row-sum-and-the-column-sum?utm_source=hashnode&utm_medium=feed)

This program inputs a matrix from the user and then uses the "i" and "j" value from the for loop to choose the element from the matrix and add them. for(int i=0;i<m;i++) { int csum=0; for(int j=0;j<n;j++) { csum=csum+arr\[j\]\[i\]; } printf("\\nSum of al...

Mar 10, 2024 · 2 min read · gagang.hashnode.dev  
Read the article

-   [#7daystreak](https://hashnode.com/tag/7daystreak)
-   [#crazyblogger](https://hashnode.com/tag/crazyblogger)
-   [#c](https://hashnode.com/tag/c)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Gagan G Saralaya](https://hashnode.com/@GaganG)

@GaganG

  
[View profile](https://hashnode.com/@GaganG)

Just a coder building cool stuff.

I'm passionate about coding and enjoy working with embedded systems, app development, and compiler design.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
