1 solutions
-
0
C :
#include<stdio.h> #include<string.h> int main(){ char s[255]; gets(s); int i; for(i=strlen(s)-1;i>=0;i--){ printf("%c",s[i]); } return 0; }
C++ :
#include<bits/stdc++.h> using namespace std; int main(){ string s; int i; getline(cin,s); for(i = s.length() - 1;i >= 0;i--) { cout<<s[i]; } return 0; }
Python :
a=input() b=[] for i in a: b.append(i) i=len(b)-1 while i>=0: print(b[i],end="") i=i-1
- 1
Information
- ID
- 10722
- Time
- 1000ms
- Memory
- 64MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By