Ok I have started fresh last night. I got throw the first 5 lessons wich I hate reading, so I'm amazed I got this far. But I have noticed that in the simple multiply 2 numbers program.
That you can only multi so big of numbers, other wise it will mess up and say things like -123321123 or something like that.Code:#include <iostream.h> #include <conio.h> int mult(int x, int y); int main() { int x, y; cout<<"please input two numbers to be multiplied: "; cin>>x>>y; cout<<"The product of your two numbers is "<<mult(x, y); getch(); return 0; } int mult(int x, int y) { return x*y; }
Why is that. And how do I fix it, if I can fix it.