Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152
‘#include’ Articles at TC101 Fall 2015, Page 4
Introduction to Programming Python and C++

Tag Archives: #include

#WSQ03-Fun with Numbers

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;

}

What should you work on?

Week #12 and more partial exams for you.

For this week's readings:
C++ (TC1017) should either be looking at support for your project, ImageMagick C++ libraries are a good start.
Python (TC1014) should be finishing chapter 11 (Dictionaries).