有一函数y=,编写程序,输入一个x的值,输出相应y的值.

有一函数y=,编写程序,输入一个x的值,输出相应y的值.

答案

分析:程序框图:

    :程序:

    Input x

    If x<0 then

    y=-1

    Else

    If x=0 then

    y=0

    Else

    y=1

    End if

    End if

    Print y

    End

相关题目

由钠和氧组成的某种离子晶体含钠的质量分数是69/109,其阴
由钠和氧组成的某种离子晶体含钠的质量分数是69/109,其阴离子只有过氧离子(O22-)和氧离子(O2-)两种。在此晶体中,氧离子和超氧离子的物质的量
We were going to play against a team from a country school.    They didn’t
We were going to play against a team from a country school.    They didn’t come until the last minute. They looked worse than we had thought. They were wearing dirty blue trousers and looked li
民国初年的国歌唱道:“东亚开化中华早,揖美追欧,旧邦
民国初年的国歌唱道:“东亚开化中华早,揖美追欧,旧邦新造,飘扬五色旗国荣光,锦绣河山普照,我同胞鼓舞文明,世界和平永保。”对此歌词的
-- Why don’t you hand in your homework?       --- I’m sorry.  I _____
-- Why don’t you hand in your homework?       --- I’m sorry.  I _____my homework at home.     A.  forget    B. forgot     C. leave     D. left
 方程根的个数为(   ) A 1个                B  3
 方程根的个数为(   ) A 1个                B  3个              C 5个                D无穷个
If we don’t start now, we must risk      the train. A. being missed   
If we don’t start now, we must risk      the train. A. being missed     B. missing          C. to miss        D. miss
顾炎武曾写道“愚自少读书,有所得,辄记之。其有不合,时
顾炎武曾写道“愚自少读书,有所得,辄记之。其有不合,时复改定。或古人先我而有者,则遂削之。积三十余年,乃成一编。取子夏之言,名曰《日知

最新题目