In/out

Description:

Ms.Kirthiga, the faculty handling programming lab for you is very strict. Your seniors have told you that she will not allow you to enter the weeks lab if you have not completed atleast half the number of problems given last week. Many of you didnt understand this statement and so they requested the good programmers from your batch to write a c program to find whether a student will be allowed into a week lab given the number of problems given last week and the number of problem solved by the students in that week. Input format: Input consists of 2 integers. The First integer corresponds to the number of problems given and the second integer corresponds to the number of problems solved. Output format: Output consists of the string "IN" or "OUT" Refer sample input and output for further formatting specifications. Test Case 1 Input (stdin) 8 3 Expected Output OUT Test Case 2 Input (stdin) 14 7 Expected Output IN

Program :

#include<stdio.h>

int main()

{

  int a,b;

  scanf("%d%d",&a,&b);

  if (b>=((int)(a/2)))

  {

    printf ("IN");

  }

    else

    {

      printf ("OUT");

    }

  return 0;

}