Hello, I need help with my C++ code using a while loop while I need to input a number above the range but I got an infinite loop. I have an infinite loop when trying to enter a value above the range...

Hello, I need help with my C++ code using a while loop while I need to input a number above the range but I got an infinite loop. I have an infinite loop when trying to enter a value above the range and the program needs to be tested for at least seven integer values between ± 2,000,000,000 and a number outside the long int data range as stated in the requirements circled in red. Thanks. Code: #include #include #include using namespace STD; int main () { Fstream output; long int num; // you can’t use small c, as cout is a keyword in c++. Char exit = NULL; output. Open ("output.txt", fstream::out); output while (exit != 'n' && exit != 'N') { cout > num; if (num > -10 && num -100 && num = 10 && num -1000 && num = 100 && num -10000 && num = 1000 && num -100000 && num = 10000 && num -1000000 && num = 100000 && num -10000000 && num = 1000000 && num else if (num > -100000000 && num = 10000000 && num -1000000000 && num = 100000000 && num output 2000000000 || num -10000000000 && num = 1000000000 && num > exit ;} output. Close () ;} else cout
Nov 16, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here