Code:
#include <iostream>
#include <cmath>
#include <stdio>
using namespace std;
int main ()
{
float first_num, second_num;
int which_one;
float result;
float dfirst;
float dsecond;
float dnum1;
float dnum2;
cout << "Please enter the first number : ";
cin >> first_num;
cout << "Please enter the second number : ";
cin >> second_num;
cout << "Press 1 to add the two numbers"
<< endl
<< "Press 2 to subtract the two numbers."
<< endl
<< "Press 3 to multiply the two numbers."
<< endl
<< "Press 4 to divide the two numbers."
<< endl
<< "Press 5 to sqrt numbers."
<< endl
<< "Press 6 to power the two numbers."
<< endl
<< "Press 7 to log the two numbers."
<< endl;
cin >> which_one;
if (which_one == 1)
result = first_num + second_num;
if (which_one == 2)
result = first_num - second_num;
if (which_one == 3)
result = first_num * second_num;
if (which_one == 4)
result = first_num / second_num;
if (which_one ==5)
result = sqrt(first_num);
if (which_one == 6)
result = pow(first_num , second_num);
if (which_one == 7)
result = log(first_num );
cout << "The result is " << result << endl;
int f;
cin >> f;
return 0;
}
what is goto statement ?
and how can i write c,q,ln ?