C++ Program to Subtract Two Numbers

This is a simple and easy c++ program to subtract two numbers entered by the user while executing this program. I assume you have basic knowledge of c++ programming language.

In the below program, we have used three variables x, y, and subtract. x and y to hold the value of entered by the user and then subtract the from variable1 to variable2 using subtract operator (-) and store into subtract variable.

Example: c++ program to subtract two numbers

Copy the below program and execute it with the help of CPP compiler.

Enter two integers for addition: 15
10
15 – 10 = 5

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:



Article Tags: , , , , , , ,