WSQ 07 Lists

Santa-list

Not this kind of list

This program asks the user for 10 numbers and then stores them in a list. Then the average and the standard deviation of these 10 numbers is calculated.

Lists code

WSQ_05_On_To_Functions

This program is similar to WSQ 01 but, instead of writing the direct operations, it calculates the sum, difference, product, quotient and residue through functions.

This link was really helpful to write this program.  http://www.cplusplus.com/forum/beginner/44001/

I’d like to share my favorite quote from Bertrand Russell.

Mathematics, rightly viewed, possesses not only truth, but supreme beauty—a beauty cold and austere, like that of sculpture, without appeal to any part of our weaker nature, without the gorgeous trappings of painting or music, yet sublimely pure, and capable of a stern perfection such as only the greatest art can show.”
― Bertrand Russell, A History of Western Philosophy.

 

On to Functions code

Final Project – Arc Reactor

Hi, I´m Franco and this is my final project for TC1017. 

Cardiovascular diseases are the number one cause of death worldwide. File_000These problems affect a lot of kids as well. Cardiovascular diseases in kids mean that they cannot do activities that require a high level of exercise for a prolonged period of time, like running or playing outside. It would be easier for parents to take care of their kid´s health if they could oversee their kid´s heart rate easily.

My solution to this problem was to create a wearable light feedback monitor that constantly measures the patient’s pulse and emits a light at the same rhythm.

As it is intended for kids (cool kids), I made it in the form of Ironman´s arc reactor and big enough for parents to see it at a distance.

It is a completely original design. I designed the hardware, the electrical circuit, and the code.

If you would like to know more about this project, please come visit me at ExpoIngeniería.

File_001 (27)File_000 (37)ECG

MeArm

Check this out! I know a lot of us are beginners in programing and robotics so I found this simple project useful to start learning, specially mechatronics students.

This project consists of a simple and small robot arm. I attached links to the gitHub page so you can download the code and schematics. You should try building it!

https://github.com/mimeindustries/MeArm

http://microbotlabs.com/armuno-arduino-schematic.html

https://shop.mime.co.uk/

mearm

WSQ 04 Sum of Numbers

I’m so sorry to upload this program like this. I know it looks like it was written by before fire was discovered. Well, this program asks the user for a

Well, this program asks the user for a lower bound and an upper bound. Then it sums every number between them including both bounds. If the user sets a lower bound greater than the upper bound the program returns an ERROR message.

I had to split the las cout in six lines instead of one because it just wouldn’t let me write it in a single line. If I wrote it in a single line my result would change to an evil six digit number.

sum-of-numbers-codesum-of-numbers-terminal

WSQ 01 Fun with Numbers

This was the first assignment, I did it long ago but I deleted it by accident. I re-upload it to have every assignment on my blog. Now my blog has no chronological order and my OCD is worse than ever.

Anyway, the program asks the user for two numbers and then it adds, substract, multiply, divide and gives the reminder of their division.

 

#include <iostream>

int main() {

int num1;
int num2;

std::cout << “Enter first number:” << ‘\n’;
std::cin >> num1;
std::cout << “Enter second number:” << ‘\n’;
std ::cin >> num2;
std::cout << “Sum, difference, product, quotient, reminder, respectively.” << ‘\n’;

std::cout << num1 + num2 << ‘\n’;
std::cout << num1 – num2 << ‘\n’;
std::cout << num1 * num2 << ‘\n’;
std::cout << num1 / num2 << ‘\n’;
std::cout << num1 % num2 << ‘\n’;

return 0;
}

 

fun-with-numbers-codefun-with-numbers-terminal