4 solutions
-
2
#include <bits/stdc++.h> using namespace std; void Double(int * p, int n) { for(int i = 0; i < n; ++i) p[i] *= 2; } int main() { int a[3][4] = { { 1, 2, 3, 4}, {5, 6, 7, 8}, { 9, 10, 11, 12 } }; Double(*a+4,6); for(int i = 0; i < 3; ++i) { for(int j = 0; j < 4; ++j) cout << a[i][j] << ","; cout << endl; } return 0; }
包ac的 每日批判
-
2
#include <bits/stdc++.h> using namespace std; void Double(int * p, int n) { for(int i = 0; i < n; ++i) p[i] *= 2; } int main() { int a[3][4] = { { 1, 2, 3, 4}, {5, 6, 7, 8}, { 9, 10, 11, 12 } }; Double(a[1],6);// 在该行补充你的代码 for(int i = 0; i < 3; ++i) { for(int j = 0; j < 4; ++j) cout << a[i][j] << ","; cout << endl; } return 0; }
-
-1
#include<iostream> #include<queue> #include<stack> #include<cmath> #include<algorithm> #include<cstring> using namespace std; int main () { int *a,b[13]={0,12,11,20,18,16,14,12,10,4,3,2,1}; int i=12; while(i>=0) { a=&b[i]; i--; cout<<*a<<","; if(i%4==0) { cout<<endl; } } return 0; }
不要抄哦 (.-.)
:)
-
-1
using namespace std; void Double(int * p, int n) { for(int i = 0; i < n; ++i) p[i] *= 2; } int main() { int a[3][4] = { { 1, 2, 3, 4}, {5, 6, 7, 8}, { 9, 10, 11, 12 } }; Double(a[1],6);// 在该行补充你的代码 for(int i = 0; i < 3; ++i) { for(int j = 0; j < 4; ++j) cout << a[i][j] << ","; cout << endl; } return 0; }
- 1
Information
- ID
- 923
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 3
- Tags
- # Submissions
- 64
- Accepted
- 36
- Uploaded By