-2

Hi...There
Wts that mean in C++??Wt I have 2 do in the program??Wt I should write?
write a C++ program that test parts a and b. (Declear additional verable in the function main, if necceccaey).

# include <iostream>
using namespace std;
int one (int x, int y);
double two (int x, double a);

int main ()

{
int num, x, y;
double dec, a, first;

cout<<"please enter two integers numbers: ";
cin>>x>>y;

cout<<"please enter a double number: ";
cin>>a;

num = one (x, y);

dec = two (x, a);

first = one (6, 8);

return 0;
}

int one (int x, int y)

{
if (x > y)
return (x+y);

else
return (x-(y*2));
}

double two (int x, double a)

{
int first;
double z;

cout<<z += a;

cout<<first += x;

if (z > first * 2)
return z;

else
return (first * 2) - z;
}

Votes + Comments
puke puke puke
no leet speak, use code tags, and no color tags
2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by firstPerson
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.