How to install nurses on a Mac

How to install nurses on a Mac

Photograph Credit

Hey guys, It’s me again. This time I didn’t specifically come to show you how to make a program. I know lots of you guys are going to make a game for the project in Ken’s class. Well if you have a mac then you will need a library called «ncurses» so you can move the cursor around the screen. That’s what this blog is for. The link for the code you have to copy on your terminal to get ncurses is this one: ncurses. And in my tutorial I also showed some code on how to print stuff in different parts of the screen(with coordinates). Well the guy on youtube that taught me how to do that is this one:

Be sure to check out his other videos, they are pretty good. He even has a tutorial on how to make the snake game in c++ using ncurses. And last but not least, here is my code. I know it’s very simple but whatever here it is: Move.cpp

Made by Orlando Lara

The Needle in the Haystack (WSQ12)

The Needle in the Haystack (WSQ12)

Photograph credit

This program was really hard to make. I think that is because we have never worked with something other than the monitor to run our programs. Now we had to involve a text file. I started this program on friday and all I have been doing is this, I finally finished and I want  to help you guys so it doesn’t take you so long. I think I easily read like 6 webpages, checked in 4 books and watched 7 youtube videos to find out how to do this program. That was the thing that consumed most of my time.

I’m gonna save your time and tell you the information that was helpful. My tutorial is divided in three sections: the first is just an introduction, the second is how to find a word in a string and the third is how to find the word in a whole text file. First you need to know how to open, close, input and output to a file. for that check out this page. Then you need to know how to work with strings to find a word in it. And the rest is to use your brain for the logic of the program. I looked in so many places really, but there was one book that had THE ANSWERS TO ALL MY PROBLEMS, I wish I had looked there in the first place. AND WHERE IS THIS BOOK?! Well.. believe it or not, it’s the book for our course. Yeah I know, who would have known. This is the first time I look at it. In my tutorial I explain how to get it but you can just press this link and download the PDF.

Seguir leyendo «The Needle in the Haystack (WSQ12)»

The Algorithm of the Quiz…6

The Algorithm of the Quiz…6

Photograph credit

It is very late, but I didn’t want to go to sleep before finishing this so here it is :). This quiz was very easy, all we had to do was follow the formula and use the arithmetic operator % to get the remainder of a division. Then we use recursion to make things a lot more easier. The program is 28 lines of code.

EuclidAlgorithm.cpp

Seguir leyendo «The Algorithm of the Quiz…6»

Can you spot the face? (palindrome)

Can you spot the face? (palindrome)

Photograph Credit

WSQ11, that was fun, wasn’t it? The interesting part was getting to use the big integers. Ken shows us how to do that but I show you how to apply it to a palindrome. I think my program es pretty simple and is easy to understand. See the trick is to separate your problems by sections. So make a function to solve each problem. The video is kind of, sort of long  but I don’t think it’s that tiring to watch so give it a shot. I’m sure you will learn some valuable information in it. Well here is the code:

YoSoy196.cpp

And of course here is the tutorial, enjoy Seguir leyendo «Can you spot the face? (palindrome)»

Quiz 5 \(._.)/

Quiz 5 \(._.)/

Photograpch Credit

Hello guys, this blog is for the two functions we had to make in quiz five. The second function is really easy so I won’t explain much in the video. The first one was a little harder but not that much. We had to use something called the ascii table. Basicly we know that computers only understand binary. So in the end every character has a number and if we add or subtract to that number then we get a different character. I’ll explain how to use this to ignore case sensitive in our program.Screen Shot 2016-03-11 at 1.05.31 AM

Alright so here is the code:

Palindrome.cpp

FindThrees.cpp

Here is the tutorial for the first function of the quiz: Palindrome.

And here is the tutorial for the second function of the quiz: FindThrees.cpp

Made by Orlando Lara