1 Replies - 572 Views - Last Post: 07 October 2009 - 09:05 AM Rate Topic: -----

#1 abdulrali  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 07-October 09

airline regestration

Post icon  Posted 07 October 2009 - 08:59 AM

plz help me with this codes.
import java.io.*;

public class FlightRegestration {

 public static void main(String[]args)	throws Exception{
 DataInputStream in = new  DataInputStream(System.in);
 int type = Integer.parseInt(in.readLine());
 Flight(type);
 while(Flight(type)!=false){
 }
 }
 public static int Flight(int type){
  int bc = 20;
  int fc = 50;
  int ec = 100;
  int bcctr = 0;
  int fcctr = 0;
  int ecctr = 0;
  int total = 0;
  
  int max = bc + fc + ec;
 
  while(max != total){
	  total = bcctr + fcctr + ecctr;
	  while(type == 1){
		bcctr++;
		if(bc != bcctr){
			System.out.println("Your Seat Number Is:"+bcctr);
		}
		 else{
			  System.out.println("FULL");
		 }
	  break;
	  }
  
	while(type == 2){
		fcctr++;
		if(fc != fcctr){
			System.out.println("Your Flight Number Is:"+fcctr);
		}
		 else{
			  System.out.println("FULL");
		 }
		 break; 
	  }
	  while(type == 3){
		ecctr++;
		if(ec != ecctr){
			System.out.println("Your Flight Number Is:"+ecctr);
		}
		 else{
			  System.out.println("FULL");
		 }
		 break; 
	  }
   break;
  }
 }
 
}



as this code is showing error

Is This A Good Question/Topic? 0
  • +

Replies To: airline regestration

#2 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 550
  • View blog
  • Posts: 5,624
  • Joined: 20-March 08

Re: airline regestration

Posted 07 October 2009 - 09:05 AM

View Postabdulrali, on 7 Oct, 2009 - 09:59 AM, said:

as this code is showing error


And those errors would be...?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1