Skip to content

Commit 2b505f7

Browse files
Create program.c
1 parent 4815d92 commit 2b505f7

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

C/program-84/program.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include<stdio.h>
2+
int main(){
3+
char str[100];
4+
int i=0;
5+
printf("Enter any string:");
6+
gets(str);
7+
//converting to uppercase
8+
while(str[i]!= '\0'){
9+
if(str[i]>=97&&str[i]<=122){
10+
str[i]=str[i]-32;
11+
}
12+
i++;
13+
}
14+
printf("\nThe converted string is:%s", str);
15+
return 0;
16+
}

0 commit comments

Comments
 (0)