0

Write a Java program to calculate this arithmetic expression y=mx+c,where m=12,x=4,and c=10.display the value of y.

22nd Aug 2017, 12:36 PM
sandra
sandra - avatar
3 Réponses
+ 14
Why write a program if the values are known and not varying..? use a calculator instead. :|
22nd Aug 2017, 12:41 PM
Frost
Frost - avatar
0
return 12*4+10;
22nd Aug 2017, 1:18 PM
Gao Xiangshuai
Gao Xiangshuai - avatar
0
better challenge would be to find the derivatives of this expression with x being a none constant variable. or perhaps you would like to spice it even more by varying each one of the variables, take the partial derivatives of this expression and then reproduce the result all in Java code?
22nd Aug 2017, 1:23 PM
Gao Xiangshuai
Gao Xiangshuai - avatar