Ad Code

Responsive Advertisement

1072 - Interval 2

Author: Ismail Hosen

Daffodil International University





Problem Link

//Please follow from main function



#include <stdio.h>





int main()


{


    int n, i, j, countin=0, countout=0;


    scanf("%d", &n);


    for(i=1; i<=n; i++)


    {


        scanf("%d", &j);


        if(j>=10 && j<=20)


        {


            countin=countin+1;


        }


         else


         {


             countout=countout+1;


         }


    }


    printf("%d in\n", countin);


    printf("%d out\n", countout);


    return 0;


}





Post a Comment

0 Comments