0
How can i write a program to input two numbers and substraction them ?
3 Answers
+ 2
Please take a look at this code:
https://code.sololearn.com/cWx409HpnDG3/?ref=app
+ 1
Following program takes two numbers as input from the user and performs subtraction.
#include <iostream>
using namespace std;
int main() {
int a,b;
cout<<"Enter first number : ";
cin>>a;
cout<<"\nEnter second number : ";
cin>>b;
int result = a-b;
cout<<"\n\nSubraction Result = "<<result;
return 0;
}
0
I'm not an expert...
Pseudo code \/
str(int)
x = ""
y = ""
say("","Give a number")
return as x
say("",""Give another!")
return as y
x - y = z
say(z)
end
:)
The above crap-code will NOT Work, it was just an example for you to base-off-of.