Variable error and cannot convert to boolean error
<p>so ive bolded were the error are happening but  i dont understand why there happening it doesnt make sense to me</p>

<pre><code>    for(int i = 1; i &lt; Array.getLength(purchases);i++)
    {
        System.out.print("\n");
        System.out.print("Enter a price for item #"+i+": $");
        double temp3=input.nextDouble();
        double price=temp3;

            if(price=&gt;0) **&lt;==it wont let me have both = and &gt;**
            {
                total=total+price;
                double temp1=total*100;
                int temp2=(int)temp1;
                total=temp2/100.0;
        System.out.print("That was $"+price+". Your total is $"+total);
            }
       else(price==0) **&lt;=="The left-hand side of an assignment must be a variable"**
            {

            }
    }
</code></pre>
