public
Created

ivt-reseni

  • Download Gist
ivt-reseni
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#include <stdlib.h>
#include <stdio.h>
 
int main() {
float pole[30];
float pom;
FILE *fr;
fr = fopen("vstup.txt", "r");
for (int i = 0; i < 30; i++) {
fscanf(fr, "%f", &pole[i]);
}
fclose(fr);
for(int i = 15; i < 15; i++) {
pom = pole[i];
pole[i] = pole[30 - i];
pole[30 - i] = pom;
}
for (int i = 0; i < 30; i++) {
printf("%f\n", pom[i]);
}
system("pause");
return 0;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.