#include <stdio.h>
#include <stdlib.h>
void print_reverse(char s)
{
size_t len = strlen(s);
char t = s + len -1;
while(t >= s)
{
printf("%c", *t);
t = t - 1;
}
puts("");
}
int main()
{
char x[40];
puts("Введи строку \n");
fgets(x, 39, stdin);
print_reverse(x);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4Kdm9pZCBwcmludF9yZXZlcnNlKGNoYXIgcykKewpzaXplX3QgbGVuID0gc3RybGVuKHMpOwpjaGFyIHQgPSBzICsgbGVuIC0xOwp3aGlsZSh0ID49IHMpCnsKcHJpbnRmKCIlYyIsICp0KTsKdCA9IHQgLSAxOwp9CnB1dHMoIiIpOwp9CgppbnQgbWFpbigpCnsKY2hhciB4WzQwXTsKcHV0cygi0JLQstC10LTQuCDRgdGC0YDQvtC60YMgXG4iKTsKZmdldHMoeCwgMzksIHN0ZGluKTsKcHJpbnRfcmV2ZXJzZSh4KTsKcmV0dXJuIDA7Cn0=
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, or enum expected
#include <stdio.h>
^
Main.java:2: error: illegal character: '#'
#include <stdlib.h>
^
Main.java:6: error: class, interface, or enum expected
char t = s + len -1;
^
Main.java:7: error: class, interface, or enum expected
while(t >= s)
^
Main.java:10: error: class, interface, or enum expected
t = t - 1;
^
Main.java:11: error: class, interface, or enum expected
}
^
Main.java:13: error: class, interface, or enum expected
}
^
Main.java:18: error: class, interface, or enum expected
puts("????? ?????? \n");
^
Main.java:19: error: class, interface, or enum expected
fgets(x, 39, stdin);
^
Main.java:20: error: class, interface, or enum expected
print_reverse(x);
^
Main.java:21: error: class, interface, or enum expected
return 0;
^
Main.java:22: error: class, interface, or enum expected
}
^
13 errors