* Write a Program and Algorithm to find the Subtraction of two Number by using C++ Language.
Algorithm :
- Start
- Read the value of num1 ,num2 and Sub.
- Enter the value of num1.
- Enter the value of num2.
- Calculation, Sub=num1-num2;
- Print the value of Subtract of two number "Sub".
- Stop.
Program :
#include<iostream.h>
#include<conio.h>
int main()
{
// Technical Adda (https://mrpankajcse.blogspot.com/)
int num1,num2,Sub;
clrscr();
cout<< "Enter the value of number 1 and number 2";
cin>>a>>b;
Sub=num1-num2;
cout<< " Subtraction of two number :: "<<Sub;
return 0;
}
output
Enter the value of number 1 and number 2 = 40 ↲
20 ↲
Subtraction of two number :: 20
No comments:
Post a Comment