1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
{
char a,s,x,r,p,d,;
a = 'a';
s = 's';
x = 'x';
r = 'r';
p = 'p';
d = 'd';
markerA:
cout << "Enter 'a' for Addition" << endl << "Enter 's' for Subtraction" << endl;
cout << "Enter 'x' for Multiplication" << endl << "Enter 'd' for Division" << endl;
cout << "Enter 'p' for Powers" << endl << "Enter 'r' for Square Root" << endl;
cout << "Please disragard the quotes" << endl;
cin >> d,p,r,x,s,a;
if
(a == 'a')
{goto markerB;}
if
(s == 's')
{goto markerC;}
if
(x == 'x')
{goto markerD;}
if
(d == 'd')
{goto markerE;}
if
(r == 'r')
{goto markerF;}
if
(p == 'p')
{goto markerG;}
{
markerB:
double w, b, c,;
cout << "Please enter the first number" << endl;
cin >> c;
cout << "Please enter the second number" << endl;
cin >> b;
w = b + c;
cout << w << endl;
goto markerA;
}
{
markerC:
double t, e, f;
cout << "Please enter the original number" << endl;
cin >> t;
cout << "Please enter the number that will be taken away" << endl;
cin >> e;
f = t - e;
cout << f << endl;
goto markerA;
}
{
markerD:
double g, h, i;
i = g * h;
cout << "Please enter the first multiple" << endl;
cin >> g;
cout << "Please enter the second that multiple" << endl;
cin >> h;
cout << i << endl;
goto markerA;
}
{
markerE:
double j, k, l;
l = j/k;
cout << "Please enter the number that will be divided into" << endl;
cin >> j;
cout << "Please enter the number that will be going into " << j << endl;
cin >> k;
cout << l << endl;
goto markerA;
}
{
markerF:
double m, n;
n = sqrt(m);
cout << "Please enter the POSITIVE number you want the square root of" << endl;
cin >> m;
cout << "The square root of" << m << " is " << n << endl;
goto markerA;
}
{
markerG:
double v, y, z;
cout << "Please enter the original value" << endl;
cin >> v;
cout << "Please enter the exponent value" << endl;
cin >> y;
z = pow (v,y);
cout << z << endl;
goto markerA;
}}}
|