someone plz tell me why iam wrong

#include <stdio.h>

int main(void) {
	int a;
	scanf("%d",&a);
	long long int c,d,sum;
	for(int i=0;i<a;i++)
	{
	    sum =0;
	    scanf("%lld %lld",&c,&d);
	    int array[c];
	    for(int k=0;k<c;k++)
	    {
	        scanf("%d",&array[k]);
	        sum = sum + array[k];
	    }
	    if(sum<=d)
	    {
	        printf("Yes\n");
	    }
	    else
	    {
	        printf("No\n");
	    }
	}
}

first of all it must be #include<stdio.h> you are missing ‘#’.

1 Like