Quiz 05

Here is my blog post to my Quiz 05.

  • Create a function called is_palindrome which receives a string as a parameter and returns true if that string is a palindrome, false otherwise. Remember that a palindrome is a word that is the same forward or backward. For full points your function must ignore case and must work with any character (not just letters). So (“Dad$dad” is a palindrome even though the D is capital and d is lower case). Here is the link for my link to GitHub.

Captura de pantalla 2016-05-04 a las 10.29.04 p.m..png

  • Create a function called find_threes that receives as a parameter a list (or Vector or array for C++ students) of numbers and returns the sum of all numbers in that list that are evenly divisible by 3. Note if using vectors, you will need an additional parameter to represent the number of numbers in the array. So if the list was [0,4,2,6,9,8,3,12], the function would return 30 (0+6+9+3+12). Here is my code to GitHub.

Captura de pantalla 2016-05-04 a las 10.29.58 p.m..png

Quiz #5 :s

img055b

Palindrome -.-‘

En este quiz tuve que realizar dos códigos, uno para pedirle al usuario una palabra y el código te mostraba si era palindromo o no.

Aquí esta un link por si no se sabe que es un palindromo:

https://en.wikipedia.org/wiki/Palindrome

El segundo era sobre una función que es un poco parecido al programa de listas que realice anteriormente solo que en esta ocasión en lugar de obtener desviación estándar, promedio, etcétera ahora el usuario ingresa una cierta cantidad de números y si uno o varios de esos números son divisibles entre tres, el código automáticamente suma todos esos que son divisibles entre tres.

Las instrucciones de Ken para este quiz fueron las siguientes:

Quiz_05

Cabe recalcar que en es imagen hay un palindromo. “RACECAR”

 

En seguida se encuentran las imágenes de mis códigos junto con los ejecutables.  

El primero (is_palindrome):

Is_Palindrome

El segundo (find_threes):

Find_Threes.png

Aquí les dejare un video de YouTube el cual me sirvió de apoyo al realizar mi código de palindromos:

 

En los siguientes links de GitHub se encuentran mis códigos:

https://github.com/Ssas69/Quiz_05/blob/master/find_threes.cpp

https://github.com/Ssas69/Quiz_05/blob/master/is_palindrome.cpp

Espero les sirva de ayuda.

Cout << “I’ll be back ” << endl;  :3