Subtraction
//Write a c++ program to perform subtraction of two given numbers?
#include <iostream>
using namespace std;
int main()
{
int Num1,Num2,sub;
cout <<"Enter two integers:";
cin >>Num1>>Num2;
// subtraction of two numbers is stored in variable sub
sub=Num1-Num2;
// Prints sub
cout <<Num1<<" - "<<Num2<<" = "<<sub;
return 0;
}
Comments
Post a Comment