Notification

No New notification

Learn to code with PrepInsta

Check PrepInsta Coding Blogs, Core CS, DSA etc

One Subscription, For Everyone

Get 200+ Courses under one Subscription

  • aptitude
  • aws_cloud
  • competitive-coding
  • dbms
  • logical_reasoning
  • operating-system
  • verbal
  • tcs_nqt
  • data_science
  • ethical_hacking
  • dsa
  • verbal
  • basic_coding
  • python
  • cpp
  • java
  • basic_coding
  • python
Explore PrepInsta Prime

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Problem 44

2 comments on “Problem 44”


  • rohan

    #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;
    }


  • TADEPALLI

    #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;
    }