#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<ctype.h>
void main()
{
char string[80];
clrscr();
cout<<"Enter multiple sentences:";
gets(string);
string[0]=toupper(string[0]);
for(int i=0; string[i]!='\0'; ++i)
{
if(string[i]=='.')
{
string[i+2]=toupper(string[i+2]);
}
}
clrscr();
cout<<"Updated string is: \n"<<string;
getch();
}
No comments:
Post a Comment