#include
#include
#include
int main(void)
{
string enterword = get_string("input: ");
int t = strlen(enterword);
printf("%i\n", t);
int counter = 0;
for(int i = 0; i<= t; i++)
{
if (enterword == '.'|| enterword == '!' || enterword == '?'){
counter = counter + 1;}
}
printf("number of lines %i\n",counter);
int wordcounter = 0;
for (int i = 0; i<= t; i++)
{
if (enterword == ' ' ){
wordcounter = wordcounter + 1;
}
}
printf("total words %i\n", wordcounter + 1);
}
https://www.canva.com/design/DAEztKdQJ6I/Kt4ETn4m2hdSjcdR-M2SCg/view?utm_content=DAEztKdQJ6I&utm_campaign=designshare&utm_medium=link&utm_source=sharebutton
My query for this thread is how do I have wordcounter = wordcounter + 1 correctly formatted.
Reply
https://edstem.org/us/courses/176/discussion/976720?comment=2211477[learn_press_profile]