#include
int main()
{
int total,threshold,present=0,i;
printf(“enter total number of students in class”);
scanf(“%d”,&total);
printf(“enter the threshold number”);
scanf(“%d”,&threshold);
int arrivaltime[total];
printf(“enter arrival time of each student”);
for(i=0;i<total;i++)
scanf("%d",&arrivaltime[i]);
for(i=0;i<total;i++)
{
if(arrivaltime[i]<=0)
present++;
}
if(present<threshold)
printf("class dismiss");
else
printf("class will be there");
return 0;
}
#include
int main()
{
int total,threshold,present=0,i;
printf(“enter total number of students in class”);
scanf(“%d”,&total);
printf(“enter the threshold number”);
scanf(“%d”,&threshold);
int arrivaltime[total];
printf(“enter arrival time of each student”);
for(i=0;i<total;i++)
scanf("%d",&arrivaltime[i]);
for(i=0;i<total;i++)
{
if(arrivaltime[i]<=0)
present++;
}
if(present<threshold)
printf("class dismiss");
else
printf("class will be there");
return 0;
}
#include
int main()
{
int t;
scanf(“%d”,&t);
while(t!=0)
{
int m,n,i,count=0;
scanf(“%d %d”,&m,&n);
int arr[m];
for(i=0;i<m;i++)
scanf("%d",&arr[i]);
for(i=0;i<m;i++)
{
if(arr[i]<=0)
count++;
}
if(n<=count)
printf("No\n");
else
printf("Yes\n");
t–;
}
return 0;
}