--Originally published at Rodrigo's Blog
This is a blogg about my beautiful dog named Tomas, he is a shitzu and has 6-12 months of age.
--Originally published at Rodrigo's Blog
This is a blogg about my beautiful dog named Tomas, he is a shitzu and has 6-12 months of age.
--Originally published at Rodrigo's Blog
On this program I managed to make c++ open a .txt file and read how many lines and letters this file had. In order to do this program I used the next video https://www.youtube.com/watch?v=6vEf4n6NQtY
--Originally published at Rodrigo's Blog
Inside this program I learned how to make a list and by these I mea an array, where many values in this case doubles have been save for later giving the average and the standar deviation. I used help from a friend and from a C++ page.
https://www.programiz.com/cpp-programming/examples/standard-deviation
--Originally published at Rodrigo's Blog
Inside this program I learned how to make a list and by these I mea an array, where many values in this case doubles have been save for later giving the average and the standar deviation. I used help from a friend and from a C++ page.
https://www.programiz.com/cpp-programming/examples/standard-deviation
--Originally published at Rodrigo's Blog
On this program I managed to ask for a person a non negative number in order to return him the factorial of that number. I used help from a friend and used videos on youtube.
--Originally published at Rodrigo's Blog
On this program I learned to use functions for the purpose of making it on the long way easier for me to do this kind of programs.
https://github.com/Rodrigovalher98/C-/blob/master/Functions.cpp
#include <iostream>
using namespace std;
int sum (int x, int y)
{
int g;
g = x+y;
return g;
}
int resta (int x, int y)
{
int j;
j = x-y;
return j;
}
int multip (int x, int y)
{
int v;
v = x*y;
return v;
}
int divi (int x, int y)
{
int z;
z = x/y;
return z;
}
int resid (int x,int y)
{
int k;
k = x%y;
return k;
}
int main()
{
int x,y;
cout << ” Enter a number ” << endl;
cin >> x;
cout << ” Enter another number ” << endl;
cin >> y;
cout << ” The sum of the numbers is ” << sum(x,y) << endl;
cout << ” The difference between the numbers is ” << resta(x,y) << endl;
cout << ” The product of the numbers is ” << multip(x,y) << endl;
cout << ” The integer based division between the 2 numbers is ” << divi(x,y) << endl;
cout << ” The remainder of the division between the numbers is ” << resid(x,y) << endl;
return 0;
}
--Originally published at Rodrigo's Blog
On this program I used the internet to get the new formula, and I found a way to make the order of the numbers irrelevant, by this I mean that the number does not have to be bigger at the beginning or ending.
#include <iostream>
using namespace std;
int main ()
{
int x;
int y;
cout << “Enter 2 integers of whom you would like to get the sum of al the numbers in between” << “\n”;
cout << “Enter the first integer” << “\n”;
cin >> x;
cout <<“Enter the second integer” << “\n”;
cin >> y;
int sum;
if (x<y) {
sum=((((y*(y+1))/2)-((x*(x+1))/2))+x);
cout << “The sum for the 2 numbers is ” << sum << “\n”;}
else if (x>y) {
sum=(((((x)*(x+1))/2)-(((y)*(y+1))/2))+y);
cout << “The sum for the 2 numbers is ” << sum << “\n”;
}
return 0;
}
--Originally published at Rodrigo's Blog
On this programm I had to use random numbers and the if else conditions in order to make a game where you have to guess for a number between 0-100. I used the book and a friend as reference for this program.
--Originally published at Rodrigo's Blog
On this programming I used my knowledge about the previous programming and asked for a Temperature to convert it to Celsius.
--Originally published at Rodrigo's Blog
On this blogg I asked about 2 different numbers and with these 2 numbers I made different mathematical operations. I used help from a friend and watched youtube tutorials.