为什么编译失败啊

P1001 A+B Problem

huanhuan5555 @ 2024-10-29 20:30:24

namespace ConsoleApp1 { internal class Program { static void Main(string[] args) { int a=0, b=0; int sum=0;

        a=int.Parse(Console.ReadLine());
        b=int.Parse(Console.ReadLine());

        sum = a + b;
        Console.WriteLine(sum);

        Console.ReadKey();

    }
}

}


by hjb13357896690 @ 2024-10-29 20:33:07

@zml2004072266 能不能重新整理一下


by hjb13357896690 @ 2024-10-29 20:33:43

@zml2004072266


by hjb13357896690 @ 2024-10-29 20:35:36

@huanhuan5555 能不能重新整理


by hjb13357896690 @ 2024-10-29 20:37:23

@huanhuan5555 直接

#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    int a,b;
    cin>>a>>b;
    cout<<a+b; 
    return 0;
}

C++11


by Louis_lxy @ 2024-10-29 20:44:19

@hjb13357896690 显然他写的并不是 c++


by hjb13357896690 @ 2024-10-29 20:46:44

@Louis_lxy 是啊,但我不会。。。语言不通,但目标,AK它


by huanhuan5555 @ 2024-10-29 20:47:17

namespace ConsoleApp1

{ internal class Program

{
    static void Main(string[] args)
    {
        int a=0, b=0;
        int sum=0;

        a=int.Parse(Console.ReadLine());
        b=int.Parse(Console.ReadLine());

        sum = a + b;
        Console.WriteLine(sum);

        Console.ReadKey();

    }
}

}


|