my problem is i cant get my program to ignore the punctuations.
my code is::
Expand|Select|Wrap|Line Numbers
- #include<stdio.h>
- int main(void)
- {
- int charac;
- int count=0;
- while((charac=getchar()) !=EOF)
- {
- if( (charac>47 && 58>charac) || (charac>40 && 91>charac) || (charac>96 && 123>charac) )
- {
- putchar(charac);
- count=1;
- }
- else
- {
- if(count==1)
- {
- putchar(10);
- count++;
- continue;
- }
- else
- continue;
- }
- }
- return 0;
- }
now how can i get my program to ignore the punctuations.What is my problem?
The input is like:
blah blah blah, blah.
My output is like:
blah
blah
blah,
blah.
It suppose to be like:
blah
blah
blah
blah