View Single Post
Newbie Member
13Mar2011,23:40  
thila's Avatar
import java.io.*;
Code:
 class pizza 
 { 
    public static void main (String[] args)  
   
    throws Exception 
    { 
       String use; 
       
       System.out.println("Large - L, "); 
       System.out.println(" Medium - M"); 
       System.out.println(" Small - S"); 
   
        
       BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); 
       use = bufferedReader.readLine(); 
         
  int tot=0; 
 int tota=0; 
 int Price1=0; 
  int Price2=0; 
  int Price3=0;   
  String S,M,L; 
     
 for(int i=0;i>=100;i++) 
    
  
  
 { 
         if(use.equals("S")) 
      
       {  
           Price1=550; 
       } 
     
      else if(use.equals("M")) 
         { 
             Price2=800; 
         } 
       else if(use.equals("L")) 
       { 
           Price3=1200; 
       } 
      
       
      tota=tota+tot; 
       
    } 
    tot=Price1+Price2+Price3; 
     System.out.println("The total  price is");  
       System.out.println(tota); 
    } 
     
  
 }
why doesnt this work?