Question: don't know why my code won't output correctly, please help! 1: Compare output Output differs. See highlights below. Special character legend Input -1 Your output

don't know why my code won't output correctly, please help!

don't know why my code won't output correctly, please help! 1: Compare

output Output differs. See highlights below. Special character legend Input -1 Your

output Sum of numbers 1 + 2 + -1 is 0 Expected

output Invalid entry. Integer should be between 2 and 100. 2: Compare

1: Compare output Output differs. See highlights below. Special character legend Input -1 Your output Sum of numbers 1 + 2 + -1 is 0 Expected output Invalid entry. Integer should be between 2 and 100. 2: Compare output ^ Output differs. See highlights below. Special character legend Input 101 Your output Sum of numbers 1 + 2 + + 101 is 5151 Expected output Invalid entry. Integer should be between 2 and 100. 3: Compare output 3: Compare output Input Your output Sum of numbers 1 + 2 is 3 4. Compare output ^ Input 79 Sum of numbers 1 + 2 + + 79 is 3160 . Your output 5: Compare output Input 100 Your output Sum of numbers 1 + 2 + + 100 is 5050 5 #include 6 using namespace std; 7 int main() 8 int n, sum = 0; define variable ficout Invalid entry. Integer should be between 2 and 180."; define an accumulator variable and initialize it to define e limit variable to be input by the user 13 define a counter variable and initialize it to 1 18 validate the limit is between 2 and 100 inclusievly if(n> 188 && n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!