Problems with scanner

Hi I'm trying to do a make this simple program:
import java.util.Scanner;
public class quadrGlgApp
public static void main(String[] args)
double a, b, c;
Scanner scan = new Scanner(System.in);
a = scan.nextDouble();
b = scan.nextDouble();
c = scan.nextDouble();
GlgLoesen(a,b,c);
protected static void GlgLoesen(double a,double b,double c)
double x1, x2, D;
System.out.println("");
System.out.println(a+"(x^2)+"+b+"x+"+c+"=0");
if (a==0)
if (b==0)
if (c==0){
System.out.println("=> x kann jeden beliebigen Wert annehmen!");
}else
System.out.println("=> Es existiert keine Loesung fuer x!");
}else{
x1=-(c/b);
System.out.println("=> x="+x1);
}else{
D= ((b*b)-4*a*c);
if(D>0)
D= Math.sqrt(D);
x1=(-b+D)/2*a;
x2=(-b-D)/2*a;
System.out.println("=> x1="+x1);
System.out.println("=> x2="+x2);
}else{
if(D==0)
x1=-b/2*a;
System.out.println("=> x="+x1);
}else
System.out.println("=> Es existiert keine reelle Loesung!");
It's running, but if I try to write something in a, let`s take for example 2.0, this is the result:
2.0
Exception in thread "main" java.util.InputMismatchException
at java.util.Scanner.throwFor(Scanner.java:819)
at java.util.Scanner.next(Scanner.java:1431)
at java.util.Scanner.nextDouble(Scanner.java:2335)
at quadrGlgApp.main(quadrGlgApp.java:17)
Process completed.
What is wrong? Please help, me.
p.s.:please excuse my bad english

One thread's enough.
http://forum.java.sun.com/thread.jspa?threadID=773139

Similar Messages

  • HP officejet 6500 E709n problem with scanner

    Hi
    I buy HP officejet 6500 E709n i have problem with scanner when printer work wireless  (when work USB or cable RJ45 it's ok). When I try scanning windows give me problem "4,[2,7,80040007),(3,7,0)]", I change drivers and still not working. I have Vista and router D'link Di-524. Please help    

    Hi
    I am having problem scaning from printer to desk top.Please help me

  • COMMUNICATION PROBLEM WITH SCANNER TO COMPUTER OF DESKJET 3050 j610

    WHEN i TRY TO SCAN USING MY DESKJET 3050 j610 A MESSAGE SHOWS 'COMMUNICATION  PROBLEM NOT CONNECTED THEREFORE i AM NOT ABLE TO SCAN.
     i HAVE BEEN TRYING TO RESOLVE THIS PROBLEM OVER 8 HOURS AND I' M GETTING SICK. I'VE TRIED EVERYTHING AVAILABLE ON THE SUPPORT PROGRAMS INCLUDING 'PAINT' AND NOTHING WORKS.
     I NEED A ANSWER OR I;LL THROW THIS THING OUT

    I have the same problem here, i have two PC's both running Windows 7 but only one works printing and scanning wirelessly.
    On the PC running Windows 7 32bit wireless printing and scanning works great.
    On the PC running windows 7 64bit only wireless printing works. Havent found a solution, but just a work around. Here it is......
    1. Got to you printer and hit the Wireless button to find the IP address your router gave it.
    2. Open up your Internet browser and input the IP address.
    and...BAM!!!       if it worked it should take you to the Deskjet 3050 All-in-One J610a Embedded Web Server page and from there you can scan with what looks like all the original options if the thing was working to begin with and save to your PC.

  • Problem with Scanner input

    I want to take an int as first input and string with spaces as 2nd input via scanner input method... it takes int input and immediatly prints the output
    without taking string input.... where is the bug.... here is the code...
    import java.util.*;
    import java.io.*;
    public class Ud2
    public static void main(String[] args)
    Scanner in=new Scanner(System.in);
    int x=in.nextInt();
    String s=in.nextLine();
    System.out.print("the no is "+x+" and name is "+s);
    if the prob is due to new line charcter in the stream then how to remove or
    ignore it..?
    plzzz help.......................

    in.nextLine();Insert the above line after your nextInt call. Why? Because nextInt() does not consume the end of line(EOL) character. So when you call nextLine() you assign the EOL to s

  • Problem with drivers for HP B109 a-m all-in-one, have printer working but not scanner in windows 8

    Still have a problem with the drivers in Windows 8 release preview, for my HP B109 a-m all-in-one, have printer working but not scanner, is there any chance of a fix before final release of Windows 8 ?.

    Review my post here:
    http://h30434.www3.hp.com/t5/Windows-8-Release-Preview/SOLUTION-Get-Win-7-Printer-Drivers-HP-Solutio...
    And see if something similar will work for you.

  • Scanner driver Problem with - Windows 8.1 and HP AIO L7680

    Hi folk,
    i have a problem with my HP AIO L7680.
    I have made an upgrade to Windows 8.1 x64
    I install the actual driver version 14.8.0.
    The printer runs but the scanner makes trouble.
    When i will start a scan process i will get an error message and the scan process will be canceled.
    I will get this error message with photoshop, HP Solution Center and any other scanner software.
    The HP Print and Scan Doctor says i should contact the support.
    Here i am any idea?
    By the way i disabled my Antivirus Software during the installation.
    Thanks a lot.
    greetings
    Markus
    This question was solved.
    View Solution.

    Hi Markus,
    I understand that you are having an issue with scanning after upgrading to Windows 8.1. I will try my best to help you resolve this issue. I just need a little more information. What operating system are you running on your computer? Are you connecting wireless or with a USB cable? What is the error message that you are getting?
    I am including this document for A 'No Scan Options' or 'Scan settings are not set' Message Displays on the All-in-One there are trouble shooting steps for Windows 8 that will work for Windows 8.1.
    I hope this helps, let me know.
    Thank you,
    I worked on behalf of HP.

  • 4400F scanner has problems with color slides

    About six years after buying the 4400F scanner, I finally opened it today in order to start scanning a lot of color slides going back more than 40 years.  It seems as if the software (or the scanner itself) doesn't know where one slide ends and the next one begins.  The slide holder accommodates up to four slides.  Using several methods of scanning permitted by the software, I obtain either three or five JPEG scans.  In the case of three, the images are properly centered--only the final one is missing.  In the case of five, the images are all off-center.  
    Has anyone had a similar problem with this unit and the software when scanning slides?
    EG 

    I've got a few years experience calibrating large format printers.  First, the Yellow sounds like a file problem.  I used to work with two workstations, one PC ( RIP station ), and one Mac ( file prep station ).  I tend to agree with you in that the OS is probably not the problem.  But, any Colorburst profiles should remain in the RIP, not in the originator application.  My workflow consisted of creating EPS files that were based on established color settings in their given applications ( i.e., Illustrator, Photoshop ) which were interpreted by the RIP which had it's own calibrated profile ( perhaps more than one based on how many different substrates were being used ).  Your partner may be complicating things by incorporating a RIP profile prematurely.  If there are deviations big enough to be noticed, there has to be something in the application color settings that is causing some type of corruption.  This could lead back to the operating system, but I would think it lies somewhere in Bridge or the application color settings.  Start there.  You should seriously consider implementing a calibration system if you do not have one already.  Another slight possibility is the driver's ability to interpret files coming out of Leopard vs. files coming out of Tiger.  It may benefit you both to be in the same operating system dynamics, using the same driver versions and RIP profiles.  At the very least, match everything that is currently working successfully and put them on both machines.  If there is still a noticeable problem in color matching, then something is seriously wrong and you should call in a prepress profiling expert.  Hope this helps.

  • TS4009 Has anyone else had a problem with files going missing in iCloud?  I'm use Scanner Pro which saves files to iCloud and some of my older files are MIA

    I use Scanner Pro, which is a document scanning app.  It scans (takes a picture of) the documents then saves as a "spdoc" and uploads to iCloud, then retrieves the file when you need to view or send.  I had some important tax docs saved and when I went to open them today they can't be retrieved.  The folder containing the files shows the the space is allocated for the files (says folder is 8 mb and the files I can see in the folder are only taking up 6.2 mbs). 
    Is there anything I can do to retrieve these files.  They are super important!
    Thanks for your help!

    I was running into the same problem with my Mac.  I could not open nor find an application that would open a .spdoc file extension.  However, I went to my iPad and was able to open the file using the Scanner Pro app.  I hope this helps.

  • HT1338 Problems with Epson Perfection 1260 Scanner following latest update

    I am having problems with my Epson Perfection 1260 Scanner since the latest update from Apple.

    Not sure this will help, but sometimes resetting the printing system helps. All your printers will be deleted and need to be addeda again:
    http://support.apple.com/kb/HT1341

  • Driver Scanner will not update, there is a problem with proxy sttings and the firewall

    Driver Scanner will not update. It says there is a problem in connecting to the Uniblue browser.
    Also there is a problem with the proxy set up and the firewall.

    With that one, let's try getting an installer log to the Apple engineers for a look.
    1. Open a command prompt window. (Start menu -> Run. Type in "cmd". Hit return.)
    2. Drag and drop iTunesSetup.exe onto the window so that the full pathname of the file is at the command line prompt.
    3. Type in a space, then the following line:
    /l*v C:\log.txt
    4. Hit return.
    5. The installer will create a log file:
    C:\log.txt
    Find that file and send it as an attachment to this email address: [email protected]
    in the email to Roy, be sure to include the following information:
    - A link to the thread on Apple Discussions where the issue is being discussed
    - The username you are using in the thread
    - The version of iTunes you are using or trying to use
    - the version of Windows you are using (mention service packs)
    - A concise description of the issue you are seeing
    - The exact text of the error message you are seeing

  • Fixing problem with no scanner detection on Mac 10.6.8

    At the time I upgraded to the Snow Leopard, I experienced a loss of use of the scanner function on my HP 4500 printer scanner while I am able to use the printer function.  I've been advised to try to fix the problem with a download of Image Capture.  Where do I get right version  and how do I proceed?  Is it free?
    This question was solved.
    View Solution.

    The problem of communication that prevented the initialization of the printer by the Mac was solved by removing the printer plug from a power strip and attaching it directly to the receptacle in the wall.  Thanks to the member who posted the idea.

  • K7 delta ISLR problems with visioneer 7700 scanner and startup

    I am a computer tech at our store i ran into a problem with k7 delta board with a visioneer photoport 7700 usb scanner plugged in at bootup it sit there at bios init for 1 min before the machine boots.
    The scanner works fine but i have never seen a machine that took so long to boot with scanner pluuged into the usb.
    If i unplug the usb scanner it boot at its fast normal speed could it be because its also a card reader that part of it is slowing down the bootup process?.

    Hi,
    Wait for machine to boot, then switch on scanner - problem solved!!!  
    Axel  

  • Problems with HP C4500 Scanner

    Anyone having problems with the HP Printer/Scanner Drivers in Mavericks?
    I have a C4500 printer/scanner and the HP Scanner software doesn;t work!  Starts up ok, scans the document and it appears ok on the screen but the saved image is garbage and when you try to print the scanned document from the screen, it error messages with file access (read only?)...
    Help!!
    I use my scanner daily :-)
    Ian Baker
    Phillip Island Australia

    Thanks - that worked!  I can scan again...
    OS X can see and use the scanner with Preview, so it must be the HP software that doesn't like the new OS
    Hopefully HP will update the drivers for Mavericks and the HP Scan Utility is pretty useful I find...
    Again thanks...

  • Scanner and fax problems with the Officejet 7410 AIO

    Hi
    I have Windows 7 SP1 Ultimate 64 bit and I installed the basic drivers for the network of the Officejet 7410 AIO printer and I checked that all its functions worked properly.
    Now, the functionality of the scanner and fax do not work more as in the "Devices and Printers" not appear more their relative icons. How come? How do I install them manually?
    Thanks
    Bye
    balubeto

    Hi balubeto,
    Welcome to the HP Forums!
    I see that you are having scanning, and faxing problems with your HP Officejet 7410 on Windows 7 SP1.
    I would recommend the following:
    Run the HP Print and Scan Doctor, to diagnose the issue.
    Uninstall the software. Uninstalling the Printer Software.
    Re-install the software using the HP Printer Install Wizard for Windows.
     Hope this helps, and have a great day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • I Have Two Problems with the Fingerprint Scanner

    Hey guys, I want to slide to unlock my iPhone, but I want to authorize app purchases via fingerprint. But it seems I'm forced to have a passcode turned on in order to have touch ID active for itunes purchases. This means I have to either unlock my phone with a passcode or fingerprint and I don't want to do this? Why can't I have one without the other?
    Second problem, the scanner seesm to be flat out broken on a software level. I can record my fingerprints and use them to unlock the phone, but when making purchases on itunes/app-store it prompts me to enter my password. Yes, I've got the toggle set to active, I've tried using my fingerprint when promted for my password and I've updated to the latest software.
    I'm extremely disappointed that one of the largest companies in the world has sold me an $1100 phone that doesn't work properly. I feel like a beta tester for an unfinished product?

    First, open Terminal in your Utilities folder and paste this into the prompt line:
    sudo update_dyld_shared_cache
    Press RETURN. You will be prompted to enter your admin password which will not be echoed to the screen. Press RETURN again.
    Next, boot the computer into Safe Mode.
    Next, do the following:
    Reinstalling Lion/Mountain Lion Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

Maybe you are looking for