Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
2d array sum
//g++ 7.4.0 #include <iostream> using namespace std; int main() { int sum=0; int n,m; cin>>n>>m; int** p= new int* [n]; for(int i=0; i < n; i++){ p[i]=new int [m]; for (int j=0; j < m; j++){ cin>>p[i][j]; } } for(int k=0;k<n;k++){ for(int t=0;t<m;t++){ sum=sum+p[k][t]; } } cout<<sum; }
run
|
edit
|
history
|
help
0
mutable constexpr
palindrome
CyclicExpression Checker
Gauss 4x4
BinTreeInsert
Regression Line
12/13 quiz shickes
simple serialization
Merge intervals leetcode
A string-integer comparison trick