answersLogoWhite

0


Best Answer

#include

using std::cin;
using std::cout;
using std::endl;

int main()
{
double firstNumber(0);
cout << endl << "Enter first number: ";
cin >> firstNumber;

double secondNumber(0);
cout << endl << "Enter second number: ";
cin >> secondNumber;

cout << endl << firstNumber << " - " << secondNumber
<< " = " << (firstNumber - secondNumber) << endl;

system("PAUSE");
return 0;
}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How C code for subtract two parameters?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you create functions with multiple parameters in C plus plus?

Random example, function with two parameters: int main (int argc, char **argv) {...}


What is the smallest number of formal parameters that can be included in a function definition in C?

You can have a function with no parameters.


How to Write a C function which accepts two integer parameters a and b and returns the larger of the two?

This smells like homework, so I'll only give you pseudo-code: decimal returnLargest(decimal a, decimal b) is a &gt; b ? then, return a, else, return b;


Subtract 11 from c?

c - 11


Why pointer can't be added in computer language C?

You can add a point in C/C++. The legal operations on a pointer are that you can 1.) add a constant, 2.) subtract a constant, and 3.) subtract two pointers that refer to the same array. Anything else is meaningless.


What is the basic parameters of transmission lines?

the basic parameters of transmission lines are R,L,C and G...........


What is the distributive property of subtraction?

The distributive property of subtraction states that when subtracting a number from the sum of two other numbers, you can subtract the same number from each of the two numbers separately, and then subtract the two results. This can be represented as: a - (b + c) = (a - b) + (a - c).


What is true about the parameters of a function (Python 3)?

a. Functions can have only one parameter. b. The order in which the parameters are defined matters. c. Parameters can be passed to a function in any order. d. Parameters have no order.


What does the function counter do and what are its parameters?

There is no builtin function 'counta' in C.


What is the general format for user defined functions in c?

returntype name ( parameters )statementblockif there is no returntype or parameters, 'void' is used instead.


Tell me the pseudo code for converting Fahrenheit to Celsius?

Subtract 32 from the temperature in Fahrenheit. Multiply the result with 5/9.C = (F-32) * 5 / 9


What do you mean by linearity in parameter and linearity in model?

Any model can be linear/nonlinear. Linearity can be in parameters or in variables. In Y=a+ b*x1 + c*x2 + d*x3 the model is linear in both parameters (b,c,d) and variables(x1,x2,x3) In Y=a+ (b+c)x1 + c*x2 + d*x3 the model is nonlinear in parameters (b,c,d) and linear in variables(x1,x2,x3) In Y=a+ bx1 + c*x2*x3 + d*x3 the model is linear in parameters (b,c,d) and nonlinear in variables(x1,x2,x3) In Y=a+ bx1 + c*x2*x3 + exp(b+d)*x3 the model is nonlinear in parameters (b,c,d) and nonlinear in variables(x1,x2,x3)