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
‘#WSQ03’ Articles at TC101 Fall 2015, Page 2
Introduction to Programming Python and C++

Tag Archives: #WSQ03

#WSQ03 – Fun With Numbers

I had some issues with this because I had never programmed in C++ and I did´t even know how to begin. I had a problem compiling because I forgot to type “endl” at the end of some commands (dumb me), anyways here it is.

– Remember if you want to output text, it has to be written in between “”.

– “int” is used to display whole numbers (without decimals)

– Remember that to run the compiled program on windows you have to type ./a.exe , If you use another operating sistem (like the one used on the exam) , you have to use ./a.out

#WSQ03

My #WSQ03 is finally here. I did not have any problem doing it. All the information I needed was on …

Continue reading

WSQ03 – Fun with Numbers

For this WSQ it was useful to read through some Python 3 programming examples. Here comes my code: num1 = float( input( “Give me a number! “)) num2 = float( input( “Give me another number! “)) sum = num1 + num2 print(“The sum of both numbers is”, sum) diff = num1 – num2 print(“The difference […]

Fun with numbers

This blog is about showing you how i made a programm that works kind of like a calculator. The task was to creat a programm in which we can input two integers and the display will show the addition, the sustraction, the multiplication, the division and the reminder of the division of the numbers. For … Seguir leyendo Fun with numbers

Fun with numbers

The videos that helped me: https://www.youtube.com/watch?v=bzCzr8w-kl4 https://www.youtube.com/watch?v=smQ0_LhxKVc The code I used: #include <iostream> using namespace std; int main () { int a, b, R, S; cout<<“¡A sumar!”<<endl; cout<<“Escribe el primer numero:”<<endl; cin>>a; cout<<“Escribe el segundo numero:”<<endl; cin>>b; R=a+b; cout<<“El resultado… Continue Reading →

Fun With Numbers!

Today I did a little program where you gave two numbers to it and yo got the sum, rest, product, division an remain.

It was easy once I understood the structure of it, getting help in https://github.com/MiguelAngelCardenas/WSQ03/blob/master/NUMBERS.cpp

Here is my code:

using namespace std;

 

int main() {

 

int num1, num2, sum, rest, prod, D, resid;

 

cout

cin >>num1;

cout

cin>> num2;

 

sum = num1 + num2;

cout

cout

 

rest = num1 – num2;

cout

cout

 

D = num1/num2;

cout

cout

 

resid = num1 % num2;

cout

cout

return 0;

 

}

The fantastic fourthFor WSQ03 I did what was required but I…

The fantastic fourth

For WSQ03 I did what was required but I tried to go a little further with my code. 

First, I researched about how to make it work with the addition of two numbers, and then with that information I developed the substraction, product, and divition. These webpages are great for that information: 

http://www.programmingsimplified.com/cpp/source-code/add-numbers

http://stackoverflow.com/questions/7070346/c-best-way-to-get-integer-division-and-remainder

Then, I tried to play with some sort of loop that could repeat the process if the answer of the user to “Again?” is “yes”. This webpage explains how that works with “If”:

http://www.tutorialspoint.com/cplusplus/cpp_if_else_statement.htm

Now, “if” only made it work one time, and I wanted to run the program in a loop. For that, I used this website that explains loops:

http://www.tutorialspoint.com/cplusplus/cpp_do_while_loop.htm

I used the “do… while” loop, which basically continues to run your code while any condition is given. With this,  I succeeded in making a loop that could continue to run until the answer to the question was not an affirmation.

If anybody needs help, you can check out my code here:

https://github.com/opezaimd/TC101/blob/master/WSQ03

First code of the semester WSQ03

Well, the WSQ03 was basicaly do a program that will recieve 2 numbers, and sum, rest, multiply, and divide them; very basic, real quick, but since I am very stubborn, I wanted to create a software that does not allow… Continue Reading →

#WSQ03 FUN WITH NUMBERS

When I first read about WSQ03 I was really exited because it was the first programing assignment , but i was also very scared because i dont know anything about programing. In my first try i had some trouble because i didn’t convert my variables to int. After this little issue i really enjoyed this […]

WSQ03 Fun with numbers.

to ask the user you should use the function input, that way the program will ask the user for info. and for the sum , the product, the difference, and the remainder you only have to add the function int for the variables so it can recognized them as numbers, and remember the symbols +, […]

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).