60 576
Assignments Done
97,9%
Successfully Done
In April 2018

Answer to Question #44092 in C for hemachandhr

Question #44092
write a program to find maritual status of a male using if condetion onlt
Expert's answer
#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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions