0
$\begingroup$

if we have

A = 1; B = 44 + 1

output :: B = 45

how we can show B like this

output :: B = 44 + A

$\endgroup$
0
$\begingroup$

You can use Hold, HoldComplete, Unevaluate, or Defer.

work for your case Hold, HoldComplete, or Defer.

Best work for your case Defer

a = 1;
b = 44 + a // Defer

(* Output 44 + a *)

However using Hold and HoldComplete gives

a = 1; 
b = 44 + a // HoldComplete

(* Output HoldComplete[44 + a] *)
$\endgroup$
0
$\begingroup$
Reduce[{a == 1, b == 45, b == x + a}, x, {a, b}]

(* Out: x == 44 *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.