Topic: Basics of C++ Programming Language "ARRAY IN C++"
Codes discussed will be posted here. Write your conclusion on the ARRAY discussion.
Filename: textin.txt
Code:
--->> https://drive.google.com/file/d/1sVXIXPMnZ_AeI83fwsfercflRJhwheSK/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.
#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;
}
Comments
Leave a comment