SHARE
TWEET

Untitled

a guest Jun 17th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char *argv[]){
  5.     int n = atof(argv[1]);
  6.     FILE *input = fopen(argv[2], "r");
  7.     int tab[n];
  8.     int tab2[n];
  9.     int x = 0;
  10.     char zamiana;
  11.     char napis[n];
  12.     while (fscanf(input, "%i ", &tab[x]) == 1) {
  13.         for(int i = 0; i < n; ++i){
  14.             tab2[i] = tab[i];
  15.  
  16.     }
  17.     if(x >= n){
  18.     }else{
  19.     x++;}
  20.     }
  21.     for(int k = 0; k < n; ++k){
  22.         zamiana = tab2[k];
  23.         napis[k] = zamiana;
  24.     }
  25.    for(int i = n-1; i>= 0; --i){
  26.         printf("%c", napis[i]);
  27.     }
  28. return 0;
  29. fclose(input);
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top