1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-16 15:44:39 +00:00
202401-programming-assignments/【实践课外】0.熟悉编程环境/7-3 计算长方形的周长和面积.cpp

20 lines
285 B
C++

#include <iostream>
using std::cin;
using std::cout;
const char endl = '\n';
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
int a, b;
cin >> a >> b;
cout << "C = " << (a + b) * 2 << endl;
cout << "S = " << a * b << endl;
return 0;
}