Results 1 to 3 of 3
  1. #1
    Mariusnozz is offline Member
    Join Date
    Oct 2012
    Posts
    1
    Rep Power
    0

    Default Simple program wont start dont know why plz help :S(dont mind about french writing)

    Java Code:
    import java.util.Scanner;
    public class assurance {
    
    	
    	public static void main(String[] args) {
    	double numDossier=0;double nbAcc=0;double primeAcc;double  nouvPrime=0; double pour_aug=0;
    	Scanner sc = new Scanner(System.in);
        
    	System.out.println("Compagnie d'Assurance Automobile ABC inc");
        System.out.print("Numero de dossier de l'assure:");
        numDossier = sc.nextInt();
        System.out.print(numDossier);
    	System.out.print("Quel est son nombre d'accidents:");
    	nbAcc=sc.nextInt();
    	System.out.print(nbAcc);
    	System.out.print("Quel est le montant de sa prime actuelle:");
    	primeAcc=sc.nextInt();
    	System.out.print(primeAcc);
    	sc.close();
    	if (nbAcc==0){
    		pour_aug=-1.5;
    		
    		
    	}else{
    		if(nbAcc==1){
    			pour_aug=8;
    			
    		}else{
    			if(nbAcc==2){
    				pour_aug=15;
    				
    			}else{
    				if(nbAcc==3){
    					pour_aug=40;
    					
    				}else{
    					pour_aug=0;
    				}
    					
    				
    				if(pour_aug==0){
    						System.out.print("Supression de la police");
    						
    				}else{
    					
    					nouvPrime=nouvPrime+((primeAcc*pour_aug)+primeAcc);
    					System.out.print("Compagnie d'Assurance Automobile ABC inc\n");
    					 System.out.print("Numero de dossier de l'assuré:"+ numDossier);
    					 System.out.print("Nombre d'accidents:"+nbAcc);
    					 System.out.print("Montant de la prime actuelle:"+primeAcc);
    					 System.out.print("Pourcentage d'augementation ou de reduction:"+ pour_aug);
    					 System.out.print("Montant de sa nouvelle prime:"+nouvPrime);
    	
    				
    			}	
    		}
    	}
    	}
    	}
    	}
    Last edited by quad64bit; 10-30-2012 at 11:52 PM.

  2. #2
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    6

    Default Re: Simple program wont start dont know why plz help :S(dont mind about french writin

    Hello and welcome! Please use [code][/code] tags when posting code so we can easily read it!

    Forum Rules
    Guide For New Members
    BB Code List - Java Programming Forum

    I have edited your post to be a little more readable.

  3. #3
    SJF
    SJF is offline Senior Member
    Join Date
    Oct 2012
    Posts
    108
    Rep Power
    0

    Default Re: Simple program wont start dont know why plz help :S(dont mind about french writin

    What error are you getting?

Similar Threads

  1. New To Java dont Know where to start
    By AyooNisto in forum New To Java
    Replies: 2
    Last Post: 08-22-2012, 01:11 AM
  2. ArrayStack Question that I dont even know how to start it.
    By DigitalBullets in forum New To Java
    Replies: 0
    Last Post: 04-30-2012, 11:17 AM
  3. Help. i dont know where to even start.
    By kiddCOWBOYY in forum New To Java
    Replies: 21
    Last Post: 03-20-2012, 06:09 PM
  4. Why is my program still writing data i dont want
    By SwissR in forum New To Java
    Replies: 32
    Last Post: 07-29-2010, 12:05 PM
  5. Hello! and I need help. I dont know were to start
    By Fall0ut in forum New To Java
    Replies: 10
    Last Post: 05-19-2010, 06:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •