Monday, September 12, 2011

Change text line upper to lower case

#include<stdio.h>
#include<ctype.h>
#include<conio.h>
main(){
    char line[80];
    int i=0;
    clrscr();
    printf("\nenter a line of text in uppercase:");
    gets(line);
     //    scanf("%[^\n]",line);
    printf("uppercase of line of text converted to lowercase is \n");
    while(line[i]!='\0'){
    printf("%c",tolower(line[i]));
    i++;}
    printf("\n");
    getch();
    }

No comments:

Post a Comment

Popular 5 Posts Last 7 days