well guys Im learning C++ and Ive just coded something very interesting and very basic compile and run it!
but you have to write it on a paper then u make the calculations have.
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int x;
int y;
int z;
int w;
cout << "Math game by gh0st - Evilzone.org\n";
cout << endl;
cout << "You need to follow the next steps that the program is gonna ask u to do ok?\n";
cout << endl;
cout << "Insert any number between 1 to 10 and press enter: \n";
cin >> x;
cout << endl;
system("pause");
cout << "Now multiply it by 2\n";
y = x * 2;
cout << endl;
system("pause");
cout << "Now the result is gonna be multiplied by 5\n";
z = y + x;
cout << endl;
system("pause");
cout << "Now the result is going to be divided by the number that you thought firstly\n";
w = z / x;
cout << endl;
system("pause");
cout << "Now the result will be summed by 5\n";
w = w * 5;
cout << endl;
system("pause");
cout << "If the result is 15 then you did a good operation, thanks for playing!\n";
cout << endl;
system("pause");
return 0;
}
no matter what number u put the result will always be 15
if you have another algebra way to make this trick just post it and then I code it