Program to transform a string its uppercase ?
solution :---
step by step solution of this program ----
Step 1. select variable
Step 2. char and int
Step 3. get answer by user
Step 4. search condition
Step 5. if and else
Step 6. for loop
Step 7. ---------------------------------------------follow it --
main()
{
char str[50];
int i;
printf("your name :---");
gets(str);
for(i=0;str[i];i++){
if(str[i]>='a' && str[i]<='z')
str[i]=str[i]-32;
}
printf("%s",str);
getch();
}
main()
{
char str[50];
int i;
printf("your name :---");
gets(str);
for(i=0;str[i];i++){
if(str[i]>='a' && str[i]<='z')
str[i]=str[i]-32;
}
printf("%s",str);
getch();
}
0 Comments