Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this question you can modify the answer to question 1. Write a program that takes in three inputs, The first is a numeric input,

For this question you can modify the answer to question 1. Write a program that takes in three inputs, The first is a numeric input, the next is char, the final is another numeric input. The second input must be char that is '+', '-', '*', or '/' if it is any other char it MUST be rejected. The second input is used as the operator and the first and third input, the operands. The program will then print the result of the operator applied to the first and third input, then exit. C++

Question 1.

#include "stdafx.h"

#include using namespace std;

int main()

{

int firstNum; int secNum; cout << "Enter the first numbers ";

cin >> firstNum; cout << "Enter the second numbers " << endl;

cin >> secNum;

cout << "The values you entered is "<< firstNum * secNum<< endl;

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions