#WSQ03

When I was writing my code I learnt new commands in C++ such as “cin>>” also I found that the synthesis of the operators is the same as in C# (The one I used the last semester), now I am getting used to C++, I see that is not that hard to understand.

Maybe you are wondering how am I learning so fast? Well I am using the website Lynda.com to watch instructional videos about C++ programming, also in class I ask my classmates.

Here is the code so you can see how it works because it really does!

C++ Code in atom:

#include <iostream>
using namespace std;

int main(int argc, char const *argv[]) {
int num1, num2;
float res1, res2, res3, res4;

cout << “Hey FUN WITH NUMBERS” << endl;
cout << “Please enter a number.” << endl;
cin >> num1;
std::cout << “Please enter another number” << std::endl;
std::cin >> num2;
res1=num1-num2;
res2=num1*num2;
res3=(int)(num1/num2);
res4=(num1/num2);
cout << “The difference between is…”<<res1 <<endl;
cout << “The product between is…”<<res2 <<endl;
cout << “The integer division between is…”<<res3 <<endl;
cout << “The division between is…” <<res4 <<endl;

return 0;
}

Captura de pantalla 2016-01-29 a las 18.27.09

CC BY-SA 4.0 #WSQ03 by everolivares is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.