===========================================================================
CODING
#include<all.h>
void main()
{
int i;
char n[80],m;
clrscr();
cout<<"Enter Paragraph: \n";
gets(n);
cout<<"\nEnter any word to search: ";
cin>>m;
textcolor(YELLOW);
cout<<"\n\n";
cprintf("RESULT:- ");
cout<<"\n";
textcolor(5);
for(i=0;n[i]!='\0';i++)
{
if(n[i]==m)
{
textcolor(GREEN+BLINK);
cprintf("%c",m);
}
else
{
textcolor(5);
cprintf("%c",n[i]);
}
}
getch();
}
CODING
#include<all.h>
void main()
{
int i;
char n[80],m;
clrscr();
cout<<"Enter Paragraph: \n";
gets(n);
cout<<"\nEnter any word to search: ";
cin>>m;
textcolor(YELLOW);
cout<<"\n\n";
cprintf("RESULT:- ");
cout<<"\n";
textcolor(5);
for(i=0;n[i]!='\0';i++)
{
if(n[i]==m)
{
textcolor(GREEN+BLINK);
cprintf("%c",m);
}
else
{
textcolor(5);
cprintf("%c",n[i]);
}
}
getch();
}
===========================================================================
No comments:
Post a Comment