Look!! I´ve learned how to use variables in a programm.
At first it was kinda difficult, but after a few trys and a session of watching video in internet I finally figure it out how to do simple aritmetical operations in c++.
i´ve been playing aroun with the language, and I know that you need to follow these essential aspects:
-Initialize the variable
-Assign a value to the variable (or ask the user to introduce one).
-Make operations with the names of the variables (not the values).
Those are the basic steps that I found useful in the topic.
Here is my code.
#include <iostream>
using namespace std;
int main(){
int x;
int y;
cout<<"Hello, I´m a calculator of two values"<<endl;
cout<<""<<endl;
cout<<" give me the first value"<<endl;
cout<< ""<<endl;
cin>>x;
cout<<" give me the second value"<<endl;
cout<<""<<endl;
cin>>y;
int z=y-x;
cout<<"The addition equals to ";
cout<<z<<endl;
int c=y+x;
cout<<"The substraction equals to ";
cout<<c<<endl;
int d=y*x;
cout<<"The multiplication equals to ";
cout<<d<<endl;
int a=y/x;
cout<<"The division is equals to ";
cout<<a<<endl;
int b=y%x;
cout<<"The res equals to ";
cout<<b<<endl;
return 0;
}