#include <stdio.h>
#include <string.h>

int main()
{
    int i,t,j;
    int count=0;
    char s[10002];
    scanf("%d",&t);
    for(i=0;i<t;i++)
    {
        scanf(" %[^\n]",&s);
        for(j=0;s[j]!='\0';j++)
        {
            if(s[j]==' '&&s[j-1]!=' ')
            {
                count++;
            }
        }
        printf("count = %d\n",count+1);
        count=0;
    }

    return 0;
}

asked 23 Apr, 16:47

Lelin07's gravatar image

Lelin07
313

edited 23 Apr, 18:35

Mosharraf%20Hosain's gravatar image

Mosharraf Hosain ♦
23618

অনুগ্রহ করে সমস্যার লিংক টি দেবেন । বুঝতে পারছি না কোন সমস্যার কথা বলছেন ।

(04 May, 04:19) ssavi
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×374

question asked: 23 Apr, 16:47

question was seen: 84 times

last updated: 04 May, 04:19