current position:Home>C language programming Gao Fushuai problem, error

C language programming Gao Fushuai problem, error

2022-08-06 07:06:18CSDN Q&A

#define _CRT_SECURE_NO_WARNINGS
#include

void main() {
double height = 0.0;
double wealth = 0.0;
int handsome = 0;

printf("Please enter height (cm):");scanf("%lf", &height);printf("Please enter wealth (millions):");scanf("%lf", &wealth);printf("PleaseEnter is handsome (1/0): ");scanf("%d", &handsome);if (height >= 180 && wealth > 10 && handsome = 1) { printf("I must marry him");}else if (height >= 180 || wealth > 10 || handsome = 1) { printf("Marry, it's not enough, but it's more than the next");}else { printf("Don't marry");}getchar();getchar();

}

The result of the last prompt is

img

copyright notice
author[CSDN Q&A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/218/202207301525064373.html

Random recommended