Computer Science, asked by katyayanibala3024, 10 months ago

Rewrite the following using ternary operators if(a!=b) p= a-b else p=b-a

Answers

Answered by lrshadAli
2

Explanation:

p=a-a!,

p=a!-a

hope it's helpful...

Answered by Oreki
8

Rewritten using Ternary Operators:

p = (a != b) ? a - b : b - a;

Similar questions