Omar Bahaa

Omar Bahaa

  • NA
  • 13
  • 1.1k

For condition by comparing between 2 var. using %

Oct 2 2018 4:07 AM
Hello, I am new to Csharp and programming in general, and i have a quick question.
I want to say if "x" is greater than 50% of "y" . I wonder if the below is right.
 
if ( x > 50% y)
 
{
Console.WriteLine("something");
}
 
Thank you in advance.

Answers (2)