Temperature

--Originally published at Loading…

This was easy. Ken ask us to make a program…

“That will prompt the user for a temperature in Fahrenheit and then convert it to Celsius. Modify the program to state whether or not water would boil at the temperature given.”

As always the first thing that I did was to declare my variable. Then I put the cout instruction for show the question, and the cin for the user could write the temperature. After I write the formula for convert the Fahrenheit in to Celsius. And this was my code:

tempphoto

But it wasn’t as easy as it shows ‘cause I’m very distracted and I forget many things so it didn’t compiled very well 😞

TempPhoto2.jpg

SECOND PART

After all the mess that I did, Ken told me to be a pro and make my program said the state of the water at that temperature… I know that I can make it with an if instruction, but I forgot how I can use 3 conditions in an if, so I searched in St. Google and I found a page that helped me to finish my program, and this is my final code:

tempphoto3tempphoto4


Let’s have fun with… numbers??

--Originally published at Loading…

This is what Ken asked us to do:

Ask the user for two integer values, then use those two values to calculate and show the following:

  • The sum of the two numbers.
  • The difference of the two numbers.
  • The product of the two numbers.
  • The integer based division of the two numbers (so no decimal point). First divided by second.
  • The remainder of integer division of the two numbers.

So the first thing that I did was to declare all my variables as an integer with “int”. n01 and n02 are for the numbers to print on the terminal. Then the other 5 variables are for each one of the results of the operations that the program had to realize.  Later I put the instruction of cout to show the message “Enter the number” (and all the others messages) and cin in order that the user could give the value to the variable with the number that he wishes. Finally to give a value to n03 (or the others 4 variables) I wrote the formula for each operation, and print the result on the screen.

This is my code:

hwphoto3hwphoto4

It was nice to remember the basic things!! 


Hello World!! aleluya!!

--Originally published at Loading…

Honestly I didn’t try to do it during the first week of class cause… I was REALLY LOST about the complete class!!!! But today the Holly Spirt (and Ken) comes to me, and now I know what I’m doing. First I write my code in Atom. (I just copied from my friend’s blog, Oscar)

hwphotoThen I try to comply in Cygwin, but I didn’t have idea how to do it, so I ask for help to Ken, and guess what? IT DOESN’T RUN! He told me that maybe it wasn’t installed correctly, so I have to reinstall and then retry, and again I don’t have idea what Ken did the first time so he taught me that wonderful thing HISTORY! And finally here is my HELLO WORLD.

hwphoto2

 


I don’t know what I’m doing

--Originally published at Loading…

Hi! This is my very first time posting in a blog. Actually I’m very lost and afraid about everything in the class the programs, the homework without due date, the code, the blog, the posts, the #AbolishGrades, and all the hashtags. SOS!!

It isn’t the first time that I’m programming, when I was at the high school, in the computer class they taught us how to program in C#, and it was nice, I was really cool and those pretty things that just happen in the high school. But actually it’s been 3 years since that so… now I’m really lost.

I hope that during the semester I can become like a Jedi in this things.