C

From Sistemi Operativi
Revision as of 18:24, 28 October 2013 by Domenique (talk | contribs) (Created page with "int palindroma(char *pnt){ int dim=strlen(pnt)-1; int l=dim/2; int k; for(k=0;k<=l;k++) { if(pnt[k]!=pnt[dim]) return 0; else dim--; } return 1; }")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

int palindroma(char *pnt){

int dim=strlen(pnt)-1; int l=dim/2; int k;

for(k=0;k<=l;k++) { if(pnt[k]!=pnt[dim]) return 0; else dim--; } return 1; }