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

Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer and a blogger by hobby.

Tags: , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.