#WSQ03

In this week we learned to create a program based on a game of chance. The program makes the user guess the number that it has generated, it gives the user three tries to do this.The program gives the user hints as he enter the numbers, such as «too high» or «too low». When the user misses the three tries the program ends. (I still do not know what happens when you guess right).

captura4

captura5

#WSQ02

In this week we learned to make a program that converted degrees Fahrenheit into Celsius. The program may sound harder than it actually is, all you need is the formula for the degree conversion and that is all, the rest is just syntax. We also added in a conditional that let the user know whether or not water boiled at his/her chosen temperature. This is how it looks:

captura3

captura2

#QUIZ03

In this quiz we learned how to declare functions and use them. In this program i declared a function for square and cube roots of numbers given by the user. This program also employed a conditional because a negative number does not have a square root. Again i struggled with syntax, but not as much as i did before. This is how it looks:

captura1

captura

#WSQ01 Fun With Numbers

This was the first assignment of the course and I basically learned how to program. This is the first program i have written other than the hello world that basically teaches you nothing, but this one was a bit more challenging in the sense that you had to actually declare integers and variables. Other than that my complications were with syntax and getting used to c++, i tried to compile the program about 5 times until i got it right. Anyways the program is simple,  it asks the user for two numbers and gives the; sum, difference, product, integer division, and its remainder. This is how i did it:

captura-1

captura3

captura4

That is my program, and how it runs.