承蒙不弃

关注

C++两数求和

承蒙不弃

关注

阅读 25

2022-01-27

#include <iostream>
using namespace std;

int main() {
    
    int a,b;
    cin >> a;  // 注意cin和cout的箭头方向
    cin >> b;
    int sum = a + b;
    cout << sum << endl;

    return 0;
}
#include <iostream>
using namespace std;

int main() {

    int a,b;
    cin >> a >> b;
    cout << a + b << endl;
    
    return 0;
}

相关推荐

boom莎卡拉卡

LeetCode 1 两数求和

boom莎卡拉卡 142 0 0

ZSACH

夯实C++基础之刷题:链表——7 链表求和 两数相加

ZSACH 70 0 0

sunflower821

【C++】1 两数之和

sunflower821 19 0 0

江南北

力扣C++ 两数之和

江南北 82 0 0

想溜了的蜗牛

1.两数之和C++

想溜了的蜗牛 41 0 0

m逆光生长

C++描述 LeetCode 2. 两数相加

m逆光生长 137 0 0

梦幻之云

leetcode 2.两数相加 python + c++ + java

梦幻之云 34 0 0

殇感故事

规律数求和

殇感故事 65 0 0

Gascognya

【C++刷题】力扣-#1-两数之和

Gascognya 26 0 0

Gaaidou

LeetCode 两数之和,三数之和,最接近的三数之和,四数之和(C++)

Gaaidou 87 0 0

精彩评论(0)

0 0 举报