Advertisement
apollw

string_invertida

Apr 3rd, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h.>
  2. #include<stdlib.h>
  3. #include <conio.h>
  4.  
  5. /*Faça um procedimento que receba uma string e a retorne escrita de trás pra frente.*/
  6. int main(){
  7.  
  8.     int i;
  9.     char frase[100];
  10.  
  11.     printf("\n informe sua string:\n\n");
  12.     gets(frase);
  13.  
  14.     printf("\n\n");
  15.     for(i= strlen(frase); i>=0; i--){
  16.         printf("%c", frase[i]);
  17.  
  18.     }
  19.     printf("\n\n");
  20.  
  21. system("pause");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement