摘要:
#include <iostream> float average();//主函数在前需要申明 int main() { float x; x = average(); printf("平均值为:%5.2f\n", x); return 0; } float average() { float x1 阅读全文
摘要:
#include <iostream> int main() { float arr[10]; int i; float max; int maxindex; for (i = 0; i <= 9; i++) { scanf_s("%f/n", &arr[i]); }max = arr[0]; fo 阅读全文
摘要:
int N = 2; int M = (N == 2) ? 0: 1;//三元运算符 Console.WriteLine(M);//结果为0 N = 1; M = (N == 2) ? 0 : 1; Console.WriteLine(M);//结果为1 Console.ReadLine(); 阅读全文