Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
trying to code so it can only output i is larger than j.

What I have tried:

C#
using System;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            int i = 50;
            int j = 10;

       if(i >=j )

  {
                Console.WriteLine(i + " is larger than " + j);
            }
        }
    }
}
Posted
Updated 29-Nov-18 2:31am
v2
Comments
F-ES Sitecore 29-Nov-18 7:27am    
What's wrong with the code you have?
Member 13736730 29-Nov-18 7:34am    
thanks the code was correct just had put "=" by mistake.
Richard MacCutchan 29-Nov-18 7:27am    
And? What happens when you run this code?
Member 13736730 29-Nov-18 7:38am    
thanks the code was correct just had put "=" by mistake.
Richard MacCutchan 29-Nov-18 7:58am    
A good reason to read through your code carefully, and use the debugger, before raising a question here.

1 solution

Answered only to remove from unanswered queue: problem solved by OP
(Who needs to learn to use a debugger, stat.)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900