解析:观察算法框图发现:
当x>1时,有y=x-2;
当x≤1时,有y=2x,
所以y={■(2^x "," x≤1"," @x"-" 2"," x>1"." )┤
答案:y={■(2^x "," x≤1"," @x"-" 2"," x>1)┤
7.如图所示的算法框图表示求函数y=|x-3|的值.请将算法框图补充完整.其中①处应填 ,②处应填 .
答案:x<3(或x≤3) x-3
8.已知算法框图如图所示.
若输出的是 1/4,则输入的是__________________.
解析:由算法框图知y={■(2^("-" x) "," x≤1"," @log_81 x"," x>1"." )┤
由y=1/4,知当2-x=1/4 时,x=2,与x≤1不符,舍去;
当log81x=1/4 时,x=3,满足x>1.故输入的是3.
答案:3
9.如果学生的成绩大于或等于60分,那么输出"及格",否则输出"不及格".画出解决该问题的算法框图.