Quiz 04

--Originally published at TC1017

#Quiz04 consists in creating a program with 2 functions, one of them returns the smalest value of 3 numbers, and the others one returns the sum of their squares. I used 3 “if” statements to know which number was the smallest one.

The program is  below:

quiz4.pngquiz41.png


Sum of numbers (WSQ04)

--Originally published at TC1017

This program consists in asking the user for 2 numbers and show the sum of all of the numbers in between them. The way i chose to make the program was to use a “for” loop, which starts in the lower bound (typed by the user) and then keeps adding 1 to itself, and then adding them each time that happens. The program verifies that the user types the input correctly, and corrects it if it is wrong.

This program used #mastery02 #mastery03 #mastery04 #mastery05 #mastery14.

 

Thee program is below.

sumnum1.pngsumnum.png

 


Guess the number! WSQ03

--Originally published at TC1017

#WSQ03 consisted in creating a program that generates a random number and prompts the user to guess it, giving it “too high” or “too low” hints. I had to check in the internet to remember how the do, while function worked, and how to generate a random number. The program took me about 25 minutes of class time, and I liked it because i think it is the hardest one we have done yet.

 

The program is below:

randnum.pngrandum.png


Quiz week 3

--Originally published at TC1017

The quiz from week 3 consisted in making a program that calls 2 functions in order to print the square and cube root of a number given by the user. I used the library <cmath> to be able to call the square and cube root functions, and then call them when printing the results. The program is below.  #quiz03

quiz333.pngquiz33.png


Temperature (F° to C°)

--Originally published at TC1017

Hello, this is my #WSQ02 program for week 3, this task consisted in creating a program that coverted a temperature typed by the user in Fahrenheit and change it to degrees and tell the user if the temperature can boil water or not. This program was still easy for me and I needed no help from friends or research on internet.

Here´s the program and its result:

#include <iostream>

using namespace std;

double c,f;

int main(){

cout << “Type a temperature in Fahrenheit: “;
cin >> f;

c=5*(f-32)/9;
cout << “The temperature in celsius is: ” <<c<<endl;
if (c>=100){
cout << “Water does boil in this temperature (under typical conditions): ” << endl;
}
else{
cout << “Water does not boil in this temperature (under typical conditions)”<<endl;
}

return 0;
}

temperature.jpg


Fun with numbers!

--Originally published at TC1017

The last week I finished the first c++ program for the course (not my first one), which consisted in asking the user for two numbers and printing their sum, difference, product, division, and remainder of the division. I had c++ knowledge before starting this course, so it was a pretty easy program in my opinion. I had no help in the process of writing the program, but I asked Ken how to compile it and show it on Ubuntu . The program has 2 inputs and 5 outputs of different operations.

I´ll leave the program, and its output below: funwnumbers.jpg

funwnumbers1.jpg

 


Setting up my tools

--Originally published at TC1017

Ken taught us the second class how to set up our tools, but it was kinda hard to keep up with him so I downloaded what I could and tried to understand later by myself. I made a Github account and downloaded Atom while I was in class. I remembered that i needed another program and started research by myself in the internet which leaded me to a tutorial on how to download Bash Ubuntu in Windows 10. The next class, Ken and my classmates helped me to understand the relationship between Atom and Ubuntu and how to work with both of them. In that class i got my first program done, which will be published in my next post.

Here´s the link of the tutorial i used: http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/


Welcome to my blog!

--Originally published at TC1017

Hello everyone and welcome to my blog, my name is Mauricio Colomé and I consider myself a rookie programmer. I will be publishing all the process of how I learn the basics of c++ through the instruction and wisdom of my professor Ken Bauer. I intend to put my best effort in this course to be able to become a great programmer someday (and pass the course). Feel free to comment on anything I post about any questions or suggestions.

Thank you!

-Mauricio C.