Return to Snippet

Revision: 23172
at February 1, 2010 05:31 by sebastianf


Initial Code
/* output in lowercase */

#include <stdio.h>

int lower(int upper);

int main(int argc, const char *argv[]){
    int c;
    c=getchar();
    while(c != EOF){
        if(c<65 || c>90){
            putchar(c);
            c=getchar();
        }
        else{
            putchar(lower(c));
            c=getchar();
        }
    }
}

int lower(int upper){
          upper=upper+32;
          return(upper);
}

Initial URL


Initial Description


Initial Title
uppercase input to lowercase output

Initial Tags
function

Initial Language
C