/*
#include <iostream>
using namespace std;
struct a
{
a(int r)
{
radius=r;
}
double ga();
private:
int radius;
};
double a::ga()
{
return 3.14*radius*radius;
}
int main()
{
a waffle(3);
cout << "면적은?"<< waffle.ga();
}
*/
/*
#include <iostream>
using namespace std;
class Tower
{
public:
int height;
Tower();
Tower(int h);
int getHeight();
};
Tower::Tower():Tower(1)
{
}
Tower::Tower(int h)
{
height=h;
}
int Tower::getHeight()
{
return height;
}
int main()
{
Tower myTower;
Tower seoulTower(100);
cout <<"높이는 "<<myTower.getHeight() << "미터" << endl;
cout <<"높이는 "<<seoulTower.getHeight() << "미터" << endl;
}
*/
/*
#include <iostream>
#include <string.h>
using namespace std;
class Date
{
public:
int month,day,year;
Date();
Date(int y,int m,int d);
Date(char input[100]);
int getYear();
int getMonth();
int getDay();
void show();
};
Date::Date(int y,int m,int d)
{
year = y;
month = m;
day = d;
}
Date::Date(char input[]) {
year = 0;
month = 0;
day = 0;
for (int i=0; i<strlen(input)+1; i++)
{
if (i<4)
{
year *= 10;
year += input[i]-'0';
}
else if (i==5)
{
month=input[i]-'0';
}
else if (6<i&&i<9)
{
day*=10;
day+=input[i]-'0';
}
}
}
int Date::getYear()
{
return year;
}
int Date::getMonth()
{
return month;
}
int Date::getDay()
{
return day;
}
void Date::show()
{
cout << year << "년"<< month << "월" << day << "일" << endl;
}
int main()
{
Date birth(2014,3,20);
Date independanceday("1945/8/15");
independanceday.show();
cout << birth.getYear() << ',' << birth.getMonth() << ',' <<birth.getDay() << endl;
}
*/
/*
#include <iostream>
#include <string.h>
using namespace std;
class cm
{
public:
int a,b,c;
cm();
cm(int x,int y,int z);
void de();
void da();
void ds();
void full();
void show();
};
cm::cm(int x,int y,int z)
{
a = x;
b = y;
c = z;
}
void cm::de()
{
a=a-1;
b=b-1;
}
void cm::da()
{
a=a-1;
b=b-2;
}
void cm::ds()
{
a=a-1;
b=b-2;
c=c-1;
}
void cm::full()
{
a=10;
b=10;
c=10;
}
void cm::show ()
{
cout <<"커피머신상태," << "커피:" << a << "물:" << b <<"설탕:" << c << endl;
}
int main()
{
cm java(5,10,3);
java.de();
java.show();
java.da();
java.show();
java.ds();
java.show();
java.full();
java.show();
}
*/
/*
#include <iostream>
#include <string.h>
using namespace std;
class Integer
{
public:
int a;
int set(int x);
int get();
Integer();
Integer(int y);
Integer(char s[100]);
bool isEven();
};
Integer::Integer(int y)
{
a=y;
}
int Integer::set(int x)
{
a=x;
}
Integer::Integer(char s[])
{
a=0;
for (int i=0; i<strlen(s); i++)
{
a*=10;
a+=s[i]-48;
}
}
int Integer::get()
{
return a;
}
bool Integer::isEven()
{
return true;
}
int main()
{
Integer n(30);
cout << n.get() << ' ';
n.set(50);
cout << n.get() << ' ';
Integer m("300");
cout << m.get() << ' ';
cout << m.isEven();
}
*/