A very simple error in subtraction program
<p>I am facing a very simple error in the following program at the last print statement. But I dont know the exact reason behind it. Even the logic is correct and syntax too.</p>

<p>Please let me know the exact reason for the error.</p>

<p>Thanks</p>

<pre><code>import java.util.Scanner;
public class main
{
public static void main(String args[])
{
    int c,d;
    Scanner s = new Scanner(System.in);
    System.out.print("Enter the first number : ");
    c = s.nextInt();
    System.out.print("Enter the second number : ");
    d = s.nextInt();

    System.out.println("The sub is : "+ c-d);

}
}
</code></pre>
