C++ Program to Subtract Two Numbers

Prem Tiwari - - C++ Tutorial

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
15 – 10 = 5

About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

Tags: , , , , , , ,