Created
July 16, 2012 09:49
-
-
Save yesidays/3121862 to your computer and use it in GitHub Desktop.
Impresion de cadena al revés
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
char frase[500]; | |
int i, tamano; | |
printf("Ingresa la palabra o frase menor (Máximo 500 caracteres: "); | |
scanf(" %[^\n]", frase); | |
printf("\n"); | |
printf ("Palabra o frase al revés \n"); | |
tamano = strlen(frase); | |
for (i = tamano-1; i>=0;i--) { | |
putchar(frase[i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment