#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<conio.h>
#include<string.h>
void main()
{
char a[80];
int i=0,j;
clrscr();
printf("Enter a string\n");
gets(a);
while(a[i]!='\0')
{
for(;a[i]==' ';i++);
{
if(a[i]>='a'&&a[i]<='z')
{
a[i]-=32;
}
}
for(;a[i]!=' '&&a[i]!='\0';i++)
a[i]=a[i];
}
printf("%s",a);
getch();
}
Thanks....is there any other way to solve
ReplyDelete