Write a C program to convert lower case in to upper case [Don't use built in functions]
Sample input :jobat update
Sample output :
JOBAT UPDATE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include <stdio.h> int main() { char string[20]; int i=0; gets(string); for(i=0;i<strlen(string);i++) { if(string[i]!='\n') { if(string[i]>='a'&&string[i]<='z') { string[i]=string[i]-32; } } } printf("%s",string); return 0; } |
0 comments