For this task , my classmates and I were instructed to create a program that will prompt the user for a temperature in Fahrenheit and them convert it to Celsius. The formula that made the conversion possible was C = 5 ∗ (F − 32)/9 (where F = Fahrenheit).
The resources that helped me were:
-cpluplus.com -How to think like a computer scientist.
I added some extra steps to show more information to the user , depending on the number (x) given , like if:
-Water boils at x temperature.
-Water is in its solid state, ice.
-Water, in its solid state, becomes liquid due to its melting point.
Hello! curious readers. “Fun with numbers” is the first problem that Professor Ken Bauer assigned us. The task was to create a program that complies with the points shown in the image and thereby solve the problem.
The language is simple to understand once you study a little. The book “How to think like a computer scientist” was very useful to conceive my code, in addition to several videos of youtube.
I hope you like program and really understand the whole code
Welcome! , curious readers. This is my first post of the semester but it´s not my first approach to programming. For some health causes I had to take some months to take care of myself , but now I´m back and going to be publishing a lot of atom programs.
In this post I only show the simple code to output “Hello world” . It´s a great first example of what you can do with C++.
So, the formula basically says “Take the number you want to know its square root, add the closest perfect square number to it. And divide all that by the square root of the perfect square number multiplied by two”
As a human, you have a natural sense of comparission between number, so in that way you can know which perfect square number to use, but in your program you will have to make a for loop and increase the number and multiply it by itself in order to get the closest one, simple.
As you can see, since the series starts with 0, if the user ask you for the first term, you will have to return 0, and also for the second and third term you will have to use ifs in order to return “1”.
So I went to Expo Ingenieria and I felt motivated. People my age are making some amazing things, so I felt the need to do something amazing. I tried to make an engine that would spin at different speeds but I couldn’t make it work. But seeing all of what my classmates are doing made me realize I want to be doing cool things as well. I saw a 3d prosthesis and a lot of robotic arms.
int num1, num2, res, dif, mul;
int resta(int a, int b)
dif = a – b;
int mult(int a, int b)
mul = a * b;
int residuo(int a, int b)
res = a % b;
float division(int a, int b)
div = a / b;