Posted By

sebastianf on 02/01/10


Tagged

function uppercase lowercase getchar putchar


Versions (?)


Advertising

Submit Site


uppercase input to lowercase output


Published in: C 



Website Promotion
DIRECTORY
is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


Expand | Embed | Plain Text
  1. /* output in lowercase */
  2.  
  3. #include <stdio.h>
  4.  
  5. int lower(int upper);
  6.  
  7. int main(int argc, const char *argv[]){
  8. int c;
  9. c=getchar();
  10. while(c != EOF){
  11. if(c<65 || c>90){
  12. putchar(c);
  13. c=getchar();
  14. }
  15. else{
  16. putchar(lower(c));
  17. c=getchar();
  18. }
  19. }
  20. }
  21.  
  22. int lower(int upper){
  23. upper=upper+32;
  24. return(upper);
  25. }

Report this snippet 

You need to login to post a comment.

Download royalty free graphics