1 solutions
-
0
C :
#include<stdio.h> #include<math.h> int main() { int a[10]; int i,j,sum,n; for(i=0;i<=9;i++) { scanf("%d",&a[i]); } for(i=9;i>=0;i--) printf("%d ",a[i]); return 0; }
C++ :
#include<iostream> using namespace std; int a[11]; int main() { for (int i=1; i<=10; i++) cin>>a[i]; for (int i=1,j=10; i<j; i++,j--) { int t=a[i]; a[i]=a[j]; a[j]=t; } for (int i=1; i<10; i++) cout<<a[i]<<" "; cout<<a[10]<<endl; return 0; }
- 1
Information
- ID
- 2202
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By