Quiz 06

Exercise 1:

Consisted in fixing a c program into c++, I copy pasted a programming suggestion by Ken into the program and used

quiz61.pngquiz611.png

Exercise 2:

Consisted in createing a program which changed the type of value of 3 different variables, the was a char, an int, and a float. There is a function for every value type to change any variable into that value type, so that is what i did. The program is below.

quiz62.pngquiz622.png

Exercise 3:

Consisted in printing out a pattern of letters in a pyramid form. I just ordered multiple couts to print the correct structure. The program is below.

quiz633.pngquiz63.png

Exercise 4:

Consisted in reading 3 numbers and ordering them in ascending order, I just functions min and max to know the mallest and biggest number respectively, and used a series of ifs to know the middle one. The program is below.

quiz644.pngquiz6444.pngquiz64.png

Exercise 5:

Consisted in creating a program that tells if a year is a leap year, the is a series of rules in order to validate the request, I used ifs to adjust those rules and print the outcome. The program is below.quiz65.pngquiz655.png

Leave a comment