Answer to Question #211794 in C++ for I need your HELP

Question #211794

Topic: Basics of C++ Programming Language "ARRAY IN C++"


Codes discussed will be posted here. Write your conclusion on the ARRAY discussion. 


Filename: Example_ArrayIndexOutOfBounds.cpp


Code:

--->> https://drive.google.com/file/d/1R0lTXsQbEx8P72nPO3rcTUPN6etMealN/view?usp=sharing


*Note need proper codes and conclusion on how it's done and about the results. And please give the proper solution and explanation.


Note: Place your conclusion on why did it turn out like that and give your reasons why the results turned like that, one paragraph will do for the explanation and conclusion.


Note: Please place the proper conclusion and explanations and results of the codes which were given.


1
Expert's answer
2021-06-29T05:52:38-0400
#include<iostream>
using namespace std;

int main(){
  
  int a,b,result;
  char ch;
  
  cout<<"Enter First value";
  cin>>"a";
  cout<<"Enter second value";
  cin>>"b";
  cout<<"Enter your operator";
  cin>>ch;
  
  if(ch=='+')
    result=a+b;
  else if(ch=='-')
    result=a-b;
  else if(ch=='*')
    result=a*b;
  else if(ch=='/')
    result=a/b;
  else if(ch=='%')
    result=a%b;
  else
    cout<<"Invalid Operator!";

  return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS