/*
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
*/
/*
#include <iostream>
using namespace std;
class all {
public:
int a, b, c;
void code() {
cout << "A:LA" << endl;
}
};
class part : public all{
public:
// int a, b, c;
// overloading
// part();
// part(int k);
void show();
};
class part2 : public all {
};
void part::show() {
cout << "HELLOWORD" << endl;
}
int main() {
part p;
p.a = 10;
p.show();
p.code();
}
*/
/*
#include<iostream>
#include<string>
using namespace std;
void star(int a=5);
void msg(int id, string text="");
void star(int a)
{
for(int i=0; i<a; i++)
{
cout << "*";
}
cout << endl;
}
void msg(int id, string text)
{
cout << id << ' ' << text << endl;
}
int main()
{
star();
star(10);
msg(10);
msg(10,"HELLO");
}
*/
/*
#include<iostream>
using namespace std;
class Person{
public:
int money;
void addMoney(int money)
{
this->money += money;
}
static int sharedMoney;
static void addShared(int n)
{
sharedMoney += n;
}
};
int Person::sharedMoney = 10;
int main()
{
Person::addShared(50);
cout << Person::sharedMoney << endl;
Person han;
han.money = 100;
han.sharedMoney = 200;
Person::sharedMoney = 300;
Person::addShared(100);
cout << han.money << ' ' << Person::sharedMoney << endl;
}
*/
/*
#include<iostream>
using namespace std;
class circle{
private:
static int numofcircles;
int radius;
public:
circle(int r=1);
~circle()
{
numofcircles--;
}
double getarea()
{
return 3.14*radius*radius;
}
static int getnumofcircles()
{
return numofcircles;
}
};
circle::circle(int r)
{
radius = r;
numofcircles++;
}
int circle::numofcircles = 0;
int main()
{
circle *p = new circle[10];
cout << circle::getnumofcircles() << endl;
delete []p;
cout << circle::getnumofcircles() << endl;
circle a;
cout << circle::getnumofcircles() << endl;
circle b;
cout << circle::getnumofcircles() << endl;
}
*/
/*
#include<iostream>
using namespace std;
int add(int arr[], int n)
{
int m=0;
for(int i=0; i<n; i++)
{
m+=arr[i];
}
return m;
}
int add(int arr[], int n, int arr1[])
{
int v=0,z=0;
for(int i=0;i<n;i++)
{
v+=arr[i];
}
for(int i=0;i<n;i++)
{
z+=arr1[i];
}
return z+v;
}
int main()
{
int a[] = {1, 2, 3, 4, 5};
int b[] = {6, 7, 8, 9, 10};
int c = add(a, 5);
int d = add(a, 5, b);
cout << c << endl;
cout << d << endl;
}
*/
/*
#include<iostream>
using namespace std;
class num{
public:
int big(int a, int b);
int big(int a, int b, int c);
};
int num::big(int a, int b)
{
if(a>b)
{
if(a<100)
{
return a;
}
else
{
return 100;
}
}
else
{
if(b<100)
{
return b;
}
else
{
return 100;
}
}
}
int num::big(int a, int b, int c)
{
if(a>b)
{
if(a<c)
{
return a;
}
else
{
return c;
}
}
else
{
if(b<c)
{
return b;
}
else
{
return c;
}
}
}
int main()
{
num t;
int x = t.big(3, 5);
int y = t.big (300, 60);
int z = t.big (30, 60, 50);
cout << x << ' ' << y << ' ' << z << endl;
}
*/
/*
#include<iostream>
using namespace std;
class ArrayUtility{
public:
static void inttodouble(int source[], double dest[], int size);
static void doubletoint(double source[], int dest[], int size);
};
void ArrayUtility::inttodouble(int source[], double dest[], int size)
{
for(int i=0;i<size;i++)
{
dest[i] = source[i];
}
}
void ArrayUtility::doubletoint(double source[], int dest[], int size)
{
for(int i=0;i<size;i++)
{
dest[i] = source[i];
}
}
int main()
{
int x[] = {1, 2, 3, 4, 5};
double y[5];
double z[] = {9.9, 8.8, 7.7, 6.6, 5.6};
ArrayUtility::inttodouble(x, y, 5);
for(int i=0;i<5;i++)
{
cout << y[i] << ' ';
}
cout << endl;
ArrayUtility::doubletoint(z, x, 5);
for(int i=0;i<5;i++)
{
cout << x[i] << ' ';
}
cout << endl;
}
*/