void up(float& speed, float& one, float& two);
void down(float& speed, float& one, float& two);
void final(float& one, float& two);
int main(int argc, char *argv[])
{
float speed;
float one;
float two;
cin << speed;
up(speed,one,two);
down(speed,one,two);
right(speed,one,two);
final(one,two);
}
void up(float& speed, float& one, float& two)
{
if(speed = 1)
{
one = 10;
}
else if(speed = 2)
{
one = 20;
}
}
void up(float& speed, float& one, float& two)
{
if(speed = 1)
{
two = 10;
}
else if(speed = 2)
{
two = 20;
}
}
void final(float& one, float& two)
{
cout << one + two;
}