It takes value from a user and then user the operation of (+,-,*/).
i used c++ programming language to solve this program:
#include<iostream>
using namespace std;
int main() {
int var1, var2;
char operation;
cout << "Enter the first number : ";
cin >> var1;
cout << endl;
cout <<"Enter the operation to be perfomed : ";
cin >> operation;
cout << endl;
cout << "Enter the second nuber : ";
cin >> var2;
cout << endl;
bool right_input = false;
if (operation == '+') {
cout << var1 << " " << operation << " " << var2 << " = " << (var1 + var2);
right_input = true;
}
if (operation == '-') {
cout << var1 << " " << operation << " " << var2 << " = " << (var1 - var2);
right_input = true;
}
if (operation == '*') {
cout << var1 << " " << operation << " " << var2 << " = " << (var1 * var2);
right_input = true;
}
if (operation == '/' && var2 != 0) {
cout << var1 << " " << operation << " " << var2 << " = " << (var1 - var2);
right_input = true;
}
if (operation == '/' && var2 == 0) {
cout << "Error. Division by zero.";
right_input = true;
}
if (!right_input) {
cout << var1 << " " << operation << " " << var2 << " = " << "Error;";
cout << "Invalid Operation!";
}
cout << endl;
system("pause");
return 0;
}
Answer:
132=11x12
Step-by-step explanation:
Let a=number of pens and b=number of pencils.
8a+7b=3.37; 5a+11b=3.10.
To eliminate a variable multiply the first eqn by 5 and the second by 8:
40a+35b=16.85, 40a+88b=24.80.
Subtract these equations: 53b=7.95, b=$0.15. So 5a=3.10-1.65=$1.45, a=$0.29.
Pens are $0.29 each and pencils $0.15.
Answer:
Step-by-step explanation:
4
Answer:
The z-score is -2
Step-by-step explanation:
Here, we are asked to calculate the z-score of the height.
Mathematically, we can calculate z-score by using the formula below;
z-score = (x-mean)/SD
According to this question, mean = 44cm and SD = 3cm with x here = 38cm
Plugging these values into the z-score equation, we have
z-score = (38-44)/3 = -6/3 = -2