We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C
- Arrays and Strings
- 1D Arrays in C
- Discussions
1D Arrays in C
1D Arrays in C
Sort by
recency
|
468 Discussions
|
Please Login in order to post a comment
include
include
include
include
int main() {
}
include
int tinh(int a, int ham[]){ int tong = 0; for(int i = 0; i < a; i++){ tong += ham[i]; } printf("%d",tong); return tong; }
int main(){ int a; scanf("%d",&a); int ham[a]; for(int i = 0; i < a; i++){ scanf ("%d",&ham[i]); } tinh(a,ham); return 0; }
int main() {
}
Here is my solution: