Advertisement
LuandaBernardo

TOUPPER

Nov 20th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1.  #include<stdio.h>
  2.  #include<conio.h>
  3.  #include <string.h>
  4. #include <ctype.h>
  5.  
  6.  
  7.  main()
  8.  {
  9.         char mensagem[153], c;
  10.         int i=0;
  11.        
  12.         printf ("Digite uma frase:");
  13.         fflush(stdin);
  14.         gets (mensagem);
  15.      
  16.        
  17.         while (mensagem[i])
  18.         {
  19.             c = mensagem[i];
  20.            
  21.             if (islower(c))
  22.             c = toupper(c);
  23.             putchar(c);
  24.             i++;}
  25.            
  26.    
  27.  
  28.    
  29.     getch ();
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement