我認爲直接使用f""就可以 像這樣

a, b = int(input()), int(input())//這裏可以同一行輸入兩個變量
print(f"{a} and {b} sitting in the tree"))

用C++也行

#include<bits/stdc++.h>
using namespace std;
int main(){
    cout<<a<<" and "<<b<<" sitting in the tree";
}

0 comments

No comments so far...