#include <iostream>
using namespace std;
int main(){
cout << "Hello world!";
return 0;
}
#include <iostream>
using namespace std;
int main(){
cout << "I'm from"<< endl;
cout << "Team 0!";
return 0;
}
#include <iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
cout << "Side 1: " << a << '\n';
cout << "Side 2: " << b << '\n';
cout << "Side 3: " << c << '\n';
return 0;
}
#include <iostream>
using namespace std;
int main(){
double a, b, c;
cin >> a >> b >> c;
cout << (a + b + c) << '\n';
cout << (a * b * c) << '\n';
cout << (a + b + c) / 3 << '\n';
return 0;
}
#include <iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if(a * a + b * b == c * c){
cout << "Right triangle pyramid.";
}
else{
cout << "Not a right triangle pyramid.";
}
return 0;
}
#include <iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if(a * a + b * b == c * c){
cout << "Right triangle pyramid.";
}
else if(a * a + b * b > c * c){
cout << "Acute triangle pyramid.";
}
else{
cout << "Obtuse triangle pyramid.";
}
return 0;
}
#include <iostream>
using namespace std;
int main(){
int a[2][3] = {0};
cin >> a[0][0] >> a[0][1] >> a[0][2];
cin >> a[1][0] >> a[1][1] >> a[1][2];
cout << "Pyramid 1: " << (a[0][0] + a[0][1] + a[0][2]) << '\n';
cout << "Pyramid 2: " << (a[1][0] + a[1][1] + a[1][2]) << '\n';
return 0;
}
#include <iostream>
using namespace std;
int main(){
int sum = 0;
int a = 1;
while(a <= 1000){
sum += a;
a++;
}
cout << "1+2+3+...+1000 = " << sum;
return 0;
}
#include <iostream>
using namespace std;
int main(){
int sum = 0;
for(int i = 1; i <= 1000; i++){
sum += i;
}
cout << "1+2+3+...+1000 = " << sum;
return 0;
}
#include <iostream>
using namespace std;
int main(){
int n, m;
cout << "Enter m = ";
cin >> m;
cout << "Enter n = ";
cin >> n;
for(int i = 0; i < m; i++){
for(int j = 0; j < n; j++){
cout << '*';
}
cout << endl;
}
return 0;
}
設計⼀個程式,提供以下功能選項:程式可以重複執⾏,每次開始時要詢問使⽤功能
Jul 8, 20252025 NYCU EEcamp
Jul 8, 2025記得先填完表單~~~
Jun 29, 2025void gridPrint(string grid[], string (&prevGrid)[HEIGHT]) {int n = HEIGHT, m = WIDTH;vector<vector<string>> gridDisplay(n, vector<string>(m, " "));vector<vector<string>> gridDisplayColor(n, vector<string>(m, ""));vector<vector<string>> gridDisplayThick(n, vector<string>(m, ""));
Jun 22, 2025or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up