SHARE
TWEET

Untitled

a guest Aug 21st, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. void mostra(char s[]);
  4.  
  5. void mostraInvertido(char s[]);
  6.  
  7. void Inverte(char s[], char sa[]);
  8.  
  9. char touppper(char letra);
  10.  
  11. char tolower(char letra);
  12.  
  13. int main(){
  14.    
  15.     char frase[100];
  16.    
  17.     printf("\nInforme uma frase: ");
  18.     gets(frase[100]);
  19.    
  20.     mostraInvertido = frase[100];
  21.    
  22.     return 0;
  23. }
  24.  
  25. void mostra(char s[]){
  26.    
  27.     for(i=0; i<strlen(s); i++){
  28.         printf("\n%c", s[i]);
  29.     }
  30. }
  31.  
  32. void mostraInvertido(char s[]){
  33.    
  34.     for(i=strlen(s)-1; i>=0; i--){
  35.         printf("\n%c", s[i]);
  36.     }
  37. }
  38.  
  39. void Inverte(char s[], char sa[]){
  40.    
  41.     int i, j;
  42.    
  43.     for(j=0, i=strlen(s)-1; i>=0; i--, j++){
  44.         sa[j] = s[i];
  45.     }
  46.     sa[j] = '\0';
  47. }
  48.  
  49. char toupper(char letra[]){ //A=65 Z=90 a=97 z=122
  50.    
  51.     int i
  52.     for{
  53.         letra[] = letra[] - 32
  54.     }
  55.     return letra[]
  56. }
  57.  
  58. char tolower(char letra){
  59.    
  60.     int i
  61.    
  62.     for{
  63.         letra[] = letra[] + 32
  64.     }
  65.    
  66.     return letra[]
  67. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top