is this right ?
if it is wrong can u correct it so i can do the complite it
Code:
#include <iostream>
#include <cmath>
using namespace std;
int main ()
{
float k,sum,x,y,p;
cout << " enter 2 values" ;
cin >> x,y;
if ( k == 1 )
{
sum = x+y;
cout << " addition is : " << sum << endl;
}
else if ( k == 2 )
{
float division =( x/y && y!=0) || (y/x && x!=0);
cout << " divisionis " << division << endl;
}
else if ( k == 3 )
{
float subtraction = x-y || y-x ;
cout << "subtraction" << subtraction << endl;
}
else if ( k == 4 )
{
float multiplication = x*y;
cout << "multiplication" << multiplication << endl ;
}
else if ( k == p )
{
float power = pow(x,y) || pow (y,x);
cout << "power" << power << endl;
}