C++ Code to subtract two integers value Arithmetic Operators
first, use the 3 variables then print the statement of enter the value store the value subtract the number then print the value.
#include <iostream>
using namespace std;
int main()
{
int a, b, sub;
cout << "Enter two integers: ";
cin >> a >> b;
sub = a - b; // Subtract two integers value
cout << "Answer=" << sub;
return 0;
}
Output:-
Enter two integers: 35
10
Answer=25