Quiz #5

Hello everybody, I know that I hadn’t posted anything for a while but I’m back! With all the homework and projects, I didn’t have time to upload my codes even I had them on my computer. So heres is the Quiz #5.

Basically, we are asked to create two programs: the first one is supposed to read a string and determine if it is a palindrome or not. It’s like #YoSoy196 but this one with words. Even though I haven’t done the #YoSoy196 because there are some things that I’m not understanding, here is my code for the first program. Captura de pantalla 2016-03-22 a las 12.26.42 p.m..png

As you can see, now we’re only working with boolean expressions. The options are just ‘It is a palindrome’ or ‘It is not a palindrome’. So in the main function we receive our word, which it is a string.  Then our function called esPalindromo just compare our string and determine if it’s palindrome or not.

Here is my code on GitHub. LINK

Now, the second program had to print the addition of numbers divisible by 3. The user would type some values and the program had to determine which ones were divisible by 3 and add them. And here is the code for the second program. LINK2

Captura de pantalla 2016-03-22 a las 12.34.16 p.m.

24294566811_7004231734_k
Another Sunrise over the Alps by Rogg4n Link on Flickr: https://www.flickr.com/photos/128294308@N05/24294566811/in/explore-2016-01-14/

 

CC BY-SA 4.0 Quiz #5 by alexhfoo is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.