题目内容

写出下列程序的运行结果.

a=input(“a=”);

if  a>=0

   m=a*a-1;

   print(%io(2),m);

else

   disp(“a negative number”);

end

若输入-3,输出结果为___________;若输入2,输出结果为___________.

解析:-3<0,∴输出“a negative number”

2≥0,∴m=2×2-1=3,输出为3.

答案:a negative number  3

练习册系列答案
相关题目

违法和不良信息举报电话:027-86699610 举报邮箱:58377363@163.com

精英家教网