Tuesday 28 June 2016

Give Information And Check Premium..........

#include<stdio.h>
#include<conio.h>
void main()
{
int age;
char h,a,g;
printf("Enter Your Age ");
scanf("%d",&age);
printf("Enter m For Male, f For Female ");
scanf(" %c",&g);
printf("Enter c For City, v For Village ");
scanf(" %c",&a);
printf("Enter e For Excellent Health, p For Poor Health ");
scanf(" %c",&h);
if(age>24&&age<36&&g=='m'&&a=='c'&&h=='e')
printf("Your Premium Is Rs.4/1000 And Cannot Exceed Rs.2Lakh.");
else if(age>24&&age<36&&g=='f'&&a=='c'&&h=='e')
printf("Your Premium Is Rs.3/1000 And Cannot Exceed Rs.1Lakh.");
else if(age>24&&age<36&&g=='m'&&a=='v')
printf("Your Premium Is Rs. 6/1000 And Cannot Exceed Rs.1000.");
else
printf("You Are Not Insured.");
getch();
clrscr();
}

         Person Inshured for Take Money 


#include<stdio.h>
#include<conio.h>
void main()
{
       int age;
       char ms,g;
                 printf("Enter Your Age ");
                 scanf("%d",&age);
printf("Enter m For Married And u For Unmarried ");
              scanf(" %c",&ms);
printf("Enter m For Male, f For Female ");
              scanf(" %c",&g);
     if(ms=='m')
          printf("You Are Insured.");
     else if(ms=='u'&&g=='m'&&age>30)
            printf("You Are Insured");
      else if(ms=='u'&&g=='f'&&age>25)
              printf("You Are Insured");
else
 printf("You Are Not Insured");

  getch();
  clrscr();
}

Monday 27 June 2016

                  Leap Year Or NOt.........


#include<stdio.h>
#include<conio.h>
void main()
{
    int y;
        printf("Enter Any Year");
                   scanf("%d",&y);
if(y%400==0||(y%100!=0&&y%4==0))
                          printf("Leap Year");


                          else
                         printf("Not A Leap Year");
getch();
clrscr();
}

#include<stdio.h>
#include<conio.h>
void main()
{
int days;
clrscr();
printf("Enter the Number of the day the member is late to return the book");
scanf("%d",&days);
if(days<=5)
printf("\nYou must pay 50 paisa fine");
else if(days>=6 && days<=10)
printf("\nYou must pay 1 rupee fine");
else if (days>10 && days<30)
printf("\nYou must pay 5 rupee fine");
else if(days>=30)
printf("\nYour Membership is Cancelled");

getch();
}