Input variable in formula to get answer

Hello, I want help regarding my project.

Here's the situation... I want to calculate k from this formula "k = QL/AΔT" where 'ΔT' is variable and all others are constant.

How can I program Arduino so that I input value of 'ΔT' and get the value of 'k' displayed on the LCD display or seven segment display?? Please help.

float calcK( float deltaT) {
   float k = XXX * deltaT;
   return k 
}

This assumes that you use a calculator to work out the constant value QL/A and enter the result where I have XXX

And you use the function like this

myResult = calcK( YYY);

where YYY is the value of deltaT that you want to use

...R

Thank you for your reply :slight_smile:

'ΔT' is one single term for temperature difference.

rishi13:
'ΔT' is one single term for temperature difference.

I know. I hope that is what my code snippet reflects.

...R

Yes... Thank you so much that was really helpful :slight_smile: (y)