Saturday 19 January 2013






C program for matric  board examination registration buy using if statement.

#include<stdio.h>
void main()
{
      int age;
      for(int i=0; i<10; i++)
      {
          printf("Enter your age for matric board registration:");
          scanf("%d",&age);
      if(age>=16 && age<=20)
      {
            printf("Your registration number is %d\n",i+1*100*2*age);
      }
      if(age>20)
      {
            printf("You are over age\n");
      }
      if(age<16)
      {
            printf("Your age is not required for matric board registration\n");
            printf("Please apply when you become 16 year old\n");
      }
      }
}

OUT PUT :

No comments:

Post a Comment