Should output success if I is within 5 units of j… im getting failure with this code
- using System;
- namespace HelloWorld
- {
- class Program
- {
- static void Main(string[] args)
- {
- string output;
- int i = 10;
- int j = 10;
- if(i == j + 5|| (i == j - 5))
- {
- output = "Success";
- }
- else
- {
- output = "Failure";
- }
- Console.WriteLine(output);
- }
- }
Jignesh KumarPosted Dec 1, 2018, 3:56 PM