#include<iostream>
#include<string>
using namespace std;
int main()
{
string str1, str2, str3;
cout << "주어: ";
cin >> str1;
cout << "동사: ";
cin >> str2;
cout << "목적어: ";
cin >> str3;
cout << str1 <<" " << str2 << " a " << str3;
return 0;
}
#include<string>
using namespace std;
int main()
{
int H=0, M=0, S=0;
cout << "시: ";
cin >> H;
cout << "분: ";
cin >> M;
cout << "초: ";
cin >> S;
cout << "\n전체 초: " << ((H * 3600)+(M * 60)+ S);
return 0;
}
#include<string>
#include<math.h>
using namespace std;
int main()
{
const float py=3.3058;
float M=0;
cout << "평: ";
cin >> M;
cout << "평방미터: " << M*py;
return 0;
}
#include<string>
#include<math.h>
using namespace std;
int main()
{
int L=0, W=0, H=0;
cout << "길이: ";
cin >> L;
cout << "너비: ";
cin >> W;
cout << "높이: ";
cin >> H;
cout << "\n상자의 부피: " << L*W*H;
cout << "\n상자의 표면적: " << 2*((L*W)+(L*H)+(H*W));
return 0;
}
#include<string>
#include<math.h>
using namespace std;
int main()
{
int a=0, b=0;
cout << "첫 번째 변: ";
cin >> a;
cout << "두 번째 변: ";
cin >> b;
cout << "\n빗변 길이: " << sqrt(pow(a,2)+pow(b,2));
return 0;
}
#include<string>
using namespace std;
int main()
{
int age;
cout << "나이: ";
cin >> age;
age +=10;
cout << "10년 후에는 " << age <<"살이 됩니다. ";
return 0;
}