add l9.c
This commit is contained in:
parent
96f48505a7
commit
df0149d828
1 changed files with 16 additions and 0 deletions
16
c/l9.c
Normal file
16
c/l9.c
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
char pol[100];
|
||||||
|
printf("Enter word ");
|
||||||
|
scanf("%s", pol);
|
||||||
|
int len = strlen(pol);
|
||||||
|
if(len > 50) {
|
||||||
|
printf("Error: too long\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
strrev(pol);
|
||||||
|
printf("Reversed: %s\n", pol);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue