#include<stdio.h>
int main()
{
    int i,j,k,a[100],n;
    char c;

    scanf("%d",&k);

    for(i=0;i<k;i++)
    {
        j=0;
        do
        {
            scanf("%d%c",&n,&c);
            j++;
        }while(c!='\n');
        a[i]=j;
    }

    for(i=0;i<k;i++)
    {
        printf("%d\n",a[i]);
    }
    return 0;
}

asked 04 Jun, 06:59

the%20catalyst's gravatar image

the catalyst
1018

edited 07 Jun, 11:21

Mosharraf%20Hosain's gravatar image

Mosharraf Hosain ♦
1.0k18

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:

×416
×21
×1
×1

question asked: 04 Jun, 06:59

question was seen: 139 times

last updated: 07 Jun, 11:21