Bosses how to use c + + write a procedure in all integers and strives for the closed interval, kneel beg
CodePudding user response:
Hope this program can help you
#include
using namespace std;
Int main () {
Int left, right;
Cout<& lt;" Please enter the interval "& lt; & lt; Endl;
Cin> Left> Right;
Cout<& lt;" Interval [" & lt; & lt; left<& lt; ", "& lt; & lt; right<& lt;"] All the integers and for "& lt; & lt; (left + right) * (right - left + 1)/2 & lt; & lt; Endl;
return 0;
}
CodePudding user response: