total newbie still got problem
I am new to all this, and am still having problems with a simple program. How can I save the result of (i+j/k) as say "listprice1", in the end I want to do listprice1 + listprice2 + listprice3 and so on. where as at the moment I am doing this:
System.out.println("Total Cost " + ((i + j / k) + (l + n / m))); after my second list.
here is part of the programme
public class shoplist
{
public static void main(String[] args)
{
int i = 0;
int k = 100;
System.out.print("Cost of 1st item ");
System.out.print("Enter dollars -> ");
i = MyInput.readInt();
double j = 0.0;
System.out.print("Enter cents -> ");
j = MyInput.readDouble();
System.out.println("Cost input for 1st item is " + (i + j / k));
int l = 0;
int m = 100;
System.out.print("Enter dollars -> ");
l = MyInput.readInt();
double n = 0.0;
System.out.print("Enter cense -> ");
n = MyInput.readDouble();
System.out.println("Cost input for 1st item is " + (l + n / m));
System.out.println("Total Cost " + ((i + j / k) + (l + n / m)));

