C#编程求助:从键盘输入一个整数给变量x,若为负数,求出它的平方;若为正数,求出它的立方.

学习 时间:2026-04-08 02:25:48 阅读:1323
C#编程求助:从键盘输入一个整数给变量x,若为负数,求出它的平方;若为正数,求出它的立方.

最佳回答

天真的芝麻

含糊的小松鼠

2026-04-08 02:25:48

static void Main(string[] args)
{
int x;
int res;
x = Int32。Parse( Console。ReadLine());
if (x

最新回答共有2条回答

  • 甜美的小懒虫
    回复
    2026-04-08 02:25:48

    static void Main(string[] args){int x;int res;x = Int32。Parse( Console。ReadLine());if (x

上一篇 He does not like playing sports.I think.

下一篇 家具甲醛一般含量多少