鸡兔同笼,共有98个头,386只脚,编程求鸡、兔各多少只。代码如下,按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#include [stdio.h]int main(){ int x, y; for (x=1; x<98; x++) { _____(1)____ if ( __ (2) ___ ) { printf("x = %d, y = %d", x, y); } } return 0;}
选项:
A:(1) y = 98 - x;(2) 2*x+4*y == 386;
B:(1) y = 98 - x;(2) 2*x+4*y <= 386;
C:(1) x = 98 - y;(2) 2*x+4*y == 386;
D:(1) x = 98 - y;(2) 2*x+4*y <= 386;
发布时间:2024-04-08 08:19:03