how to get the correct difference and product of dis?!
import java.io.*;
public class exer05{
public static void main(String args[])throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int num = 0;
int number = 0;
int diff = 0,pro = 0,sum=0;
System.out.print("Enter number of times:");
number = Integer.parseInt(br.readLine());
for(int i=1;i<=number;i++){
System.out.print("Number ("+ number +")");
num = Integer.parseInt(br.readLine());
diff = diff - num;
pro = pro * num;}
{
System.out.println("\nDiff: "+diff);
System.out.println("Pro: "+pro);}
}
}