Please help super noob understand
Hi guys, I finally got some guts to start learning how to program and started reading a Java textbook. I am currently in chapter 2 and was doing "Personal Project" However my program doesn't seem to be calculating properly. Could someone explain to me in EASY ENGLISH so that this super noob can understand?
/* write an application that reads two floating point numbers and prints their sum, difference, and product */
public class pp0203 {
public static void main (String[] args)
{
float num1 = 13/8, num2 = 12/6;
System.out.println ("The sum of two mystery numbers is: " + (num1 + num2));
System.out.println ("The difference of two mystery numbers is:" + (num1 - num2));
System.out.println ("The product of two mystery numbers is: " + (num1 * num2));
System.out.println ("What are the TWO mystery numbers?");
}
}
The funny thing is that the sum should be 3.625, the difference should be -0.375, and the product should be 3.25. However, the answers my program gives me are: 3.0, -1.0, and 2.0. What seems to be the problem here?
If anyone would help me I will really appreciate it! :)