Operators

Updated on August 8, 2017 in [A] C# .Net
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
4 on August 8, 2017
Console.WriteLine("What is " + input + " Plus " + input2 + ":");
 
                           /* This operator ^ */ 
 

Can someone tell me how to put separate operators inside the ” Plus ” in print statement if possible?

 

So I can make multiple if statements of it like if (input + input2) or if (input / input2) and so on and so forth.

So I don’t have to do this and/or Do I have to do this: 


Console.Write("What is " +input + " Divided by " +input2 + " :");
Console.Write("What is " +input+ " Times " +intput2+ " :");

Thank you 🙂 

  • Liked by
Reply
1 on August 8, 2017

I don’t really get the question…

You want to replace the “Plus” with divide, times… ?

on August 8, 2017

The question I was asking is this. Can I put multiple operators in:

Console.WriteLine("value" + input + " <<Operators here>>" + input +);

Sorry if my question is not pointed out correctly.

Show more replies
  • Liked by
Reply
Cancel
1 on August 8, 2017

I think I understand.
Short answer… no. But this might help give a little bit further guidance based on other people’s workarounds…

on August 8, 2017

Exactly what I’m looking for. Thank you Binary Beal. 

Show more replies
  • Liked by
Reply
Cancel