Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Palindrome-detection/Pike/palindrome-detection.pike
Normal file
16
Task/Palindrome-detection/Pike/palindrome-detection.pike
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
int main(){
|
||||
if(pal("rotator")){
|
||||
write("palindrome!\n");
|
||||
}
|
||||
if(!pal("asdf")){
|
||||
write("asdf isn't a palindrome.\n");
|
||||
}
|
||||
}
|
||||
|
||||
int pal(string input){
|
||||
if( reverse(input) == input ){
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue