1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
gladu [14]
3 years ago
8

Write a C++ program to build a simple calculator(+،-،*،/) using switch statement?​

Computers and Technology
1 answer:
Mars2501 [29]3 years ago
4 0

Answer:

Check explanation

Explanation:

# include <iostream>

using namespace std;

int main()

{

   char op;

   float a, b;

   cout << "Enter operator either + or - or * or /: ";

   cin >> op;

   cout << "Enter two operands: ";

   cin >> num1 >> num2;

   switch(op)

   {

       case '+':

           cout << a + b;

           break;

       case '-':

           cout << a - b;

           break;

       case '*':

           cout << a * b;

           break;

       case '/':

           cout << a / b;

           break;

       default:

           cout << "This operator is not valid. Please try again.";

           break;

   }

   return 0;

}

You might be interested in
What is the difference between a learner’s license and an operator’s license?
Allushta [10]
A learner's license does not allow the person to drive without someone else who has their operator's (or driver's license) or an adult who is at least 21. Although this varies depending on the state. 
7 0
3 years ago
You locate a web page that includes "edu" in the address, along with other words and symbols. the page is simple—a plain backgro
stich3 [128]
No, just because it is an edu address doesn't mean it is a good source. Avoid websites with minimal content or effort to the page they are most likely fake. <span />
7 0
4 years ago
Aisha designed a web site for her school FBLA club and tested it to see how well it would resize on different systems and device
VARVARA [1.3K]

Answer: responsive

Explanation:

its called mobile responsivness and most good websites have it

5 0
2 years ago
Suppose you will invest $100 per month at the beginning of the month for 40 years with interest rate
Alexeev081 [22]

Answer:

future value = 232369.1361

return % = 384.10 %

Explanation:

given data

principal = $100 per month

time = 40 year = 480 months

rate = 6.25 % yearly = 0.0625 yearly = 0.005208 monthly

to find out

total amount of capital at the end of your investment and percentage is  your total return

solution

so here future value formula is

future value = P \frac{(1+r)^{t-1}}{r} * (1+r)   ..........1

here r is rate and t is time and P is principal

so put all value

future value = 100 \frac{(1+0.005208)^{480-1}}{0.005208} * (1+0.005208)

future value = 232369.1361

so

Total capital at the end of investment-Total principle invested over the years

232369.1361 - 100 ( 12 × 40 )

184369.1361

so

Return % = \frac{184369.1361}{48000} × 100

return % = 384.10 %

5 0
3 years ago
Was the type writer the first part of the keyboard? ​
hoa [83]

Answer:

no because of the fact that there were clickers

Explanation:

the key board came out after the clicker

8 0
3 years ago
Other questions:
  • Use this illustration to answer the question.
    15·1 answer
  • What is a device driver?
    9·2 answers
  • Plz answer me will mark as brainliest ​
    7·2 answers
  • What is scratch in information system .
    14·1 answer
  • Why did the Wright brothers construct their own wind tunnel?
    11·1 answer
  • Which one of the following may be used as an input as well as an output device? A. Fax machine B. Scanner C. Printer D. Voice re
    9·1 answer
  • Sensing that the future of computing was in personal computers and that computers' power would reside not in their size but in t
    5·1 answer
  • In what tab can a user find the workspace option?
    8·1 answer
  • Which option allows users to access the handout master to modify it?
    5·1 answer
  • In order to access the internet, it is not necessary to have an Internet Service Provider (ISP).
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!