76 409
Assignments Done
Successfully Done
In May 2019

Answer to Question #4353 in C++ for kishen naik

Question #4353
a company ensures a driver in the following cases:
1)if the driver is married.
2)if the driver is unmarried, male and above 30 years of age.
3)if the driver is unmarried, female and above 25 years of age.
in all other cases the driver is not ensuredif the marriable date is 6 and age of the driver are the input . write a program to determine when driver is ensured or not.
Expert's answer
#include <stdio.h>
#include <stdlib.h>

char GetEnsered(char Mar,char male,char Year)
& if((Mar=='Y')||(Mar=='y'))
& {
return 0;
& }
& else
& {
& return 0;
else if(Year>=25) return 0;
else return 1;
& }

int main()
int i=0;
& char Mar,male;
& int Year=0;
& printf("Enter drivers data:\n Is driver married? (Type Y or N):");
& scanf("%c",&Mar);
& printf("Is he male? ( Type Y or N):");
& scanf("%c",&male);
& printf("How old is driver?(Enter number above 0):");
& if(GetEnsered(Mar,male,Year)==0) printf("Driver is ensured\n\n");
else printf("Driver is not ensured\n\n");


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions