Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n,i;
- scanf("%d",&n);
- int niza[n];
- for(i=0;i<n;i++){
- scanf("%d",&niza[i]);
- }
- for(i=0;i<n;i++){
- printf("%d ",niza[i]);
- }
- printf("\n");
- for(i=n-1;i>=0;i--){
- printf("%d ",niza[i]);
- }
- printf("\n");
- for(i=n-1;i>=0;i--){
- if(i%2==0){
- printf("%d ",niza[i]);
- }
- }
- printf("\n");
- for(i=0;i<n;i++){
- if(i%2==0){
- printf("%d ",niza[i]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement