解析:由算法框图知{■(a+2b=14"," @2b+c=9"," @2c+3d=23"," @4d=28"," )┤
解得{■(a=6"," @b=4"," @c=1"," @d=7"." )┤
答案:6,4,1,7
8.分别写出下列算法输出的结果.
(1) (2)
a=1 a=10
b=2 b=20
c=a+b c=30
b=a+c-b a=b
输出a,b,c b=c
c=a
输出a,b,c
解(1)因为a=1,b=2,c=a+b,所以c=3.
又b=a+c-b,所以b=1+3-2=2.
(2)由b=20及a=b,知a=20,
由c=30及b=c,知b=30,
由c=a及a=20,知c=20.
输出的结果分别为(1)1,2,3;
(2)20,30,20.
9.任意给出两个横坐标不相同的点的坐标,写出这两个点所确定的直线上的横坐标为C的点的纵坐标.设计一个算法,解决这类问题,并画出算法框图.
解算法步骤如下:
1.输入x1,y1,x2,y2,C.
2.y=y2-y1.
3.y=y/(x_2 "-" x_1 ).
4.y=y(C-x1).
5.y=y1+y.