Skip to content

Instantly share code, notes, and snippets.

@yesidays
Created July 16, 2012 09:49
Show Gist options
  • Save yesidays/3121862 to your computer and use it in GitHub Desktop.
Save yesidays/3121862 to your computer and use it in GitHub Desktop.
Impresion de cadena al revés
#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