1. Write C++ program to find the sum of two numbers.
Answers
Answered by
1
Answered by
1
Answer:
int main()
{
int x,y;
int total = 0;
cout<<"Please give me an integer: ";
cin >> x;
cout<<"Please give me another integer: ";
cin >> y;
int counter = x;
while(counter <= y ){
total += counter;
++counter;
}
cout << "The total of the numbers " << total<<endl;
}
Similar questions