这怎么没有输出值呢?
楼楼我按答案上打的,然后按答案上说的把最后的%d改成了%f,然后,悲剧就发生了程序代码:
int max(float x, float y) { return(x > y ? x : y); } #include<stdio.h> int main() { int max(float x, float y); float a, b; int p = 1; while (p == 1) { printf("Please enter a and b:\n"); scanf_s("%f%f", &a, &b); if (a != b) p = 0; } printf("The max is %f\n", max(a, b)); return 0; }
问题出在哪里了