I am required to write a program that adds two numbers. It also requires us to display an error message and terminate the program when more than two numbers are entered by the user. I am a beginner and thus I am having trouble in constructing an IF statement that can terminate the program when more than two integers are entered by the user. For instance in the output:
Please enter two numbers for addition:
2 2 3
Error! System terminating
So how do i make that error message to appear and terminate the program when the user enters more than two integers?
Thanks!