Question #44092
write a program to find maritual status of a male using if condetion onlt
1
Expert's answer
2014-07-11T09:13:13-0400
#include <stdio.h>#include <stdlib.h>#include <string.h> int main(){    char answer;    char *status = "single";    printf("Are you married(Y/N)?\n");    scanf("%c", &answer);    if (answer == 'Y') {       status = "married";    }    printf("Your martial statusis %s.", status);    return 0;}

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!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS