### Noob here, need help with

Thanks Josue Molina

 ``1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950`` ``````#include using std::cout; using std::endl; using std::cin; int main() { cout << "Please Enter Two Integers : " << endl; int integer1 ; int integer2 ; int product = 0; int product1 = 0; int one = 1; cin >> integer1 ; cin >> integer2 ; if (integer1 < integer2) { while (integer1 < integer2) { int number1 = (product1 * integer2) ; number1 = (integer1 + 1); product1 = integer1 * (integer1 + one++); if (number1 == integer2) { int product2 = number1; } cout << "The Product For The Series of " << integer1 << " and " << integer2 << " Is: " << product2 << std::endl ; return 0; } } else if (integer2 < integer1) { } else if (integer1 = integer2) { product = integer1; cout << "The Series Product For " << integer1 << " and " << integer2 << " Is: " << product << std::endl ; return 0; } }``````
Last edited on
 ``1234567891011121314151617181920`` ``````#include int main() { std::cout << "Numbers: "; int a, b; std::cin >> a >> b; if (a > b) std::swap(a, b); int c = 1; for (int i = a; i <= b; i++) c *= i; std::cout << "Result: " << c; return 0; }``````
thank you so much the only question i have is which part of this code allows for 7 and 7 =7 (or any of the same choosen number to equal itself with out essentially squaring?)?
Last edited on
It's all, on line 14. Trace the code; it's not that long. :-)
Topic archived. No new replies allowed.