===========================================================================
CODING
#include<all.h>
void main()
{
clrscr();
int i,c;
char *str;
gotoxy(1,2);
cprintf("Enter Paragraph:- ");
gotoxy(1,3);
gets(str);
gotoxy(1,3);
for(i=0,c=0;str[i]!='\0';i++)
{
if(str[i]==' ')
c=c+1;
}
gotoxy(1,25);
textcolor(GREEN);
cprintf("This Paragraph contains ");
textcolor(RED+BLINK);
cprintf("%d ",c+1);
textcolor(GREEN);
cprintf("Words");
getch();
}
CODING
#include<all.h>
void main()
{
clrscr();
int i,c;
char *str;
gotoxy(1,2);
cprintf("Enter Paragraph:- ");
gotoxy(1,3);
gets(str);
gotoxy(1,3);
for(i=0,c=0;str[i]!='\0';i++)
{
if(str[i]==' ')
c=c+1;
}
gotoxy(1,25);
textcolor(GREEN);
cprintf("This Paragraph contains ");
textcolor(RED+BLINK);
cprintf("%d ",c+1);
textcolor(GREEN);
cprintf("Words");
getch();
}
===========================================================================
No comments:
Post a Comment