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

学习 时间:2026-06-05 14:11:59 阅读:2994
C#编程求助:从键盘输入一个整数给变量x,若为负数,求出它的平方;若为正数,求出它的立方.

最佳回答

温暖的万宝路

留胡子的耳机

2026-06-05 14:11:59

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

最新回答共有2条回答

  • 伶俐的奇迹
    回复
    2026-06-05 14:11:59

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

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

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