Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define MAX 100
- int main()
- {
- int tab[MAX], i, n;
- printf("Podaj ilosc liczb (max 100)\n");
- scanf("%d", &n);
- for(i=0; i<n; i++){
- printf("Podaj %d wyraz ciagu\n", i+1);
- scanf("%d", &tab[i]);
- }
- printf("Mamy ciag: \n");
- for(i=0; i<n; i++)
- printf("%d, ", tab[i]);
- printf("\n");
- printf("Ciag po odwroceniu: \n");
- for(i=n-1; i>=0; i--)
- printf("%d, ", tab[i]);
- printf("\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement