Help solve the problem.

Its work fine about compile.
However i have problem with least number, its should be positive number without negative number.
Please help me;;
Example:
Enter a number: 54
Enter a number: 65
Enter a number: 2
Enter a number: 888
Enter a number: -1
Least number is:-1 <===== it should be "2"
<its my code>
import java.util.*;
public class Test2 {
public static void main(String[]args){
int number;
int least;
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter a number: ");
number = keyboard.nextInt();
least = number;
if (number < 0) {
System.out.print("No numbers. ");
else {
while (number >= 0) {
System.out.print("Enter a number: ");
number = keyboard.nextInt();
if ((least >= 0) && (least > number))
least = number;
System.out.print("Least number is:" + least);
Edited by: CHjijibaba on Sep 15, 2007 2:51 AM
Edited by: CHjijibaba on Sep 15, 2007 3:06 AM

<p>import java.util.*;
public class Test2 {</p><p> public static void main(String[]args){
int number;
int least;
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter a number: ");
number = keyboard.nextInt();
least = number;
if (number < 0) {
System.out.print("No numbers. ");
else {
while (number >= 0) {
System.out.print("Enter a number: ");
number = keyboard.nextInt();
if ((least > -1) && (least > number))
least = number;
System.out.print("Least number is:" + least);
}</p>
Edited by: CHjijibaba on Sep 15, 2007 4:04 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Help solve the problem after restor iphone 5 ios 7 asks email

    Help solve the problem after restor iphone 5 ios 7 asks apple ID
    I Forgot apple ID

    Only one way- to remember it. There is no way around cause it is a new security feature. Better stress your memory.

  • Help solve the problem, with the lifting of purchasing and payment card is locked, and now I can not pay for her purchases in the app store

    help solve the problem, with the lifting of purchasing and payment card is locked, and now I can not pay for her purchases in the app store

    Contact the App store for Apple ID help. Their support link is on the right of the App store window
    LN

  • Crashes when I attempt to clear browser history;temp fix:I use IObit Security to clean browsing history,cannot clean it all,cleans most,I am then able to clear the rest of my history thru Firefox;I thought this info would help solve the problem

    Crashes when I attempt to clear browser history;temp fix:I use IObit Security to clean browsing history,cannot clean it all,cleans most,I am then able to clear the rest of my history thru Firefox;I thought this info would help solve the problem

    Crap thought that text was all the characters I was allotted, not just the title.
    Anyway I wouldn't have even posted this if you guys would have allowed me to reply to the already existing thread I found through google. Said about 20 or so people had the same problem and no one found the contributor's answer useful, including myself.
    Anyway, I use Firefox, because it is one of two (other being internet explorer) that Trend Micro's security package includes protection with. Same with spyware blaster which I also use but Trend Micro is the deal breaker. Also I like Firefox 4 and your ad blocker is better than google chrome's. However if I continue to have problems with clearing my browser history it is back to Opera and Google Chrome for me. IObit Security supports both of them, it also seems to be the best security system I have ever come across, I will just pay for their subscription and stop using Trend Micro.
    This is a very big problem I hope it is being addressed. Only addon I have is your ad blocker. Also this is completely on your end, not ours. I am the perfect test, my computer is brand new, and by brand new I mean I just started using it the other day, the same day my firefox browser kept crashing as I attempted to clear my browsing history.
    Windows 7, 8GBs RAM, AMD athlon II quad core 2.90 GHz
    Can't even clear an hours worth of browsing history without firefox crashing.

  • I have a new iphone 5. After update and download some programs I can not just turn it on and shown in the LCD "iTunes" with a picture of a USB cable. - Alguine can help solve the problem. thanks

    I have a new iphone 5. After update and download some programs I can not just turn it on and shown in the LCD "iTunes" with a picture of a USB cable. - Can anyone help me solve the problem. thanks

    Its trying to tell you to connect it by usb to a computer to reflash a failed firmware flash
    You should comply

  • How should i solve the problem for the exception.

    <b>Web is below:</b>
    Error when processing your request
    <b>What has happened?</b>
    The URL http://xxxxxxx.xxxxx:xxxxxx/sap/bc/bsp/sap/xxxxxxx/result.htm was not called due to an error.
    <b>Note</b>
    The following error text was processed in the system D50 : The current application triggered a termination with a short dump.
    The error occurred on the application server sapcidev01_D50_00 and in the work process 1 .
    The termination type was: RABAX_STATE The ABAP call stack was:
    Form: DIALOG_CHECK of program CL_IMC_MODE===================CP
    Form: PREPARE_MODE of program CL_IMC_MODE===================CP
    Form: GET_MODE_BY_NAME of program CL_IMC_MODE===================CP
    Form: SEND_COMMAND of program CL_DV_IMC_CLIENT==============CP
    Form: PROCESS_COMMAND of program CL_DV_SDV=====================CP
    Form: DISP_DOC of program CL_DV_SDV=====================CP
    Form: DISP_AO_DOC of program CL_DV_SDV_AO==================CP
    Form: DISP_AO_DOCS of program CL_DV_SDV_AO==================CP
    Function: ALINK_DISPLAY_IMC of program SAPLALINK_DISPLAY_DOCUMENT
    Function: ARCHIVOBJECT_DISPLAY of program SAPLOPTA
    <b>What can I do?</b>
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system D50 in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server sapcidev01_D50_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 1 in transaction ST11 on the application server sapcidev01_D50_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 151 -u: 117846 -l: E -s: D50 -i: sapcidev01_D50_00 -w: 1 -d: 20070320 -t: 062938 -v: RABAX_STATE -e: MESSAGE_TYPE_X
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    <b>Run ST22 and information is below:</b>
    Source Code Extract
    Line SourceCde
    1 METHOD DIALOG_CHECK.
    2 DATA: GUI_FLAG TYPE SY-BATCH.
    3
    4 * IMC NUR in Online-Modus ? (kein Batch und dunkle Batch-Input-Betrieb)
    5 IF GUI_IS_ON IS INITIAL.
    6 CALL FUNCTION 'RFC_IS_GUI_ON'
    7 EXPORTING
    8 LOGIN_CHECK = ' '
    9 IMPORTING
    10 ON = GUI_FLAG.
    11
    12 IF GUI_FLAG <> 'Y'.
    13 IF RABAX IS INITIAL.
    14 CLEAR EXISTS.
    15 ELSE.
    >>>>> MESSAGE X005(IMC).
    17 ENDIF.
    18 ELSE.
    19 GUI_IS_ON = 'Y'.
    20 EXISTS = 'X'.
    21 ENDIF.
    22 ELSE.
    23 EXISTS = 'X'.
    24 ENDIF.
    25
    26 ENDMETHOD.
    i can access the other bsp web.but this bsp application raises the exception. Who can help solve the problem?
    I appreciate your help.

    Is it SAP BSP application or custom?
    If its custom,check whether you are using any MESSAGE statements. Handle all the Exceptions from Class/Methods/Function module to avoid the Dump.
    Raja T

  • Can anyone help me solve the problem of text displaying very rough on my new ASUS PA279Q display monitor running off my MacBook Pro?

    This is regarding a brand new ASUS PA 279Q, 2560 x 1440 IPS monitor. I'm connected via mini display port (into thunderbolt port on MacBook Pro) to display port on ASUS monitor; using cable ASUS included with the monitor. Mid 2012 MacBook Pro…full specs at bottom of this post.
    I have resolution set at 2560 x 1440 which is the native resolution according to the ASUS spec. I tried the other resolutions available in my System Preferences and text displayed rough with those settings too. I've tried adjusting contrast, brightness and sharpness via the ASUS control panel and didn't solve the problem. Also tried calibrating via Mac's system preferences/display and that did not improve text display either. All the text on this monitor (no matter what software I launch, Finder, InDesign, Illustrator, MS Word, Excel, VMWare Windows XP, Windows versions of Word, Excel, Acrobat, etc, all are consistently rendering text the same way ---  ROUGH and with "HALOS" around each letter.
    All point sizes of text and at various scales, display very rough on the screen. (My comparison is the retina display of my MBP and a Thunderbolt…so those two displays are my expectations.) I'm using the same MBP for both a Thunderbolt display (at work) and this ASUS at my home office.
    On the ASUS it's not as noticeable when the text is on white backgrounds, but I'm a graphic designer and compose images with text all day everyday. Not to mention the specs on this ASUS PA279Q indicate it's built for the professional so I would expect better text rendering. I haven't even addressed color calibration and balance yet, because that won't matter to me if the text won't display any better than it is now.
    I was so hopeful after researching all the specs on this monitor it would be a viable alternative to the glossy display of the Thunderbolt display. (Which, I do love the Thunderbolt display for it's clarity and how it displays crisp, clean text at all sizes. (This ASUS actually displays text decently if I increase the text so each letter is about 4" high. Which is pointless for practical purposes -- that'd be like doing page layout through a microscope!)
    I kept holding off on getting a monitor for the home office thinking the Thunderbolt would be updated soon. I'd be sick if I dropped a grand on piece of 2011 technology only to learn a few days later an updated Thunderbolt display hit the market! Not to mention, I'm praying Apple comes out with a less reflective Thunderbolt display. The glare and reflection is the main reason I looked elsewhere for a large monitor; hence my asking for help. Hoping the ASUS text display issue can be worked out. My expectation is for it to display like the MBP retina and Thunderbolt display text. That possible?
    Alternatively, I guess I could do the Apple Refurb Thunderbolt at $799. And see if there's a decent aftermarket anti-glare I could stick on it?
    Thanks for reading my post. Hope someone can help; offer any suggestions? Words or wisdom?
    Has anyone else had similar issues and figured out a resolution? Help!
    MacBook Pro
    Retina, Mid 2012, 2.3 Ghz Intel i7
    8GB 1600 MHz DDR3
    OS X 10.8.5
    NVIDIA GeForce GT 650M 1024 MB
    ASUS PA279Q

    I uninstalled those two items. It still runs slow on start-up and when opening safari, firefox, iphoto, itunes, etc. It's not snappy like it used to be. Any other ideas? Thanks.

  • Help needed, M getting this message sandbox environment error no test user account, when downloading any application from iTunes, friend told me to sign out and sign in iTunes it might solve the problem but instead I cannot login I to my itune account.

    Help needed,
    I am getting this message sandbox environment error no test user account, when downloading any application from iTunes, friend told me to sign out and sign in iTunes it might solve the problem , and i triyed it but still  I cannot login I to my itune account. Same message keeping. Popping up,  this problem started supricly today.

    Take a look at the instructions here.
    http://www.technogal.net/2012/03/this-is-not-test-user-account-please.html

  • My iPad shows a message "Cannot find AirPrint printer". I used to use my iPad to print materials using HP wireless printer D110. Now it does not want to print. Is this because I am now using IOS 7? What should I do to solve the problem? Help please.

    My iPad shows a message "Cannot find AirPrint printer". I used to use my iPad to print materials using HP wireless printer D110. Now it does not want to print. Is this because I am now using IOS 7? What should I do to solve the problem? Help please.

    Restart your WiFi router and printer by removing power for 30 seconds.

  • My new iPhone 5 has black and white lines on the screen. It's not been damaged. I've tried turning it off but this does not solve the problem? Please help.

    My new iPhone 5 has black and white lines on the screen. It's not been damaged. I've tried turning it off but this does not solve the problem? Please help. I can't find my answer on the Internet.

    By far the most common problem hardware-wise seems to be scuffs on the aluminium. Yours is the first report of a faulty screen I've seen.
    If you use the same Apple ID on both devices it'll sync whatever you want it to - music/apps/photos/messages/etc.
    I've just switched from a Galaxy S3 to iPhone 5 (having already owned an iPad for a while) so I'm in a similar position!

  • How to solve the problem when opening program illustrator cs6 ERROR: 16 It is WINDOWS 8.1 / 64 BIT help please

    how to solve the problem when opening program illustrator cs6
    ERROR: 16
    It is WINDOWS 8.1 / 64 BIT
    help please

    Thanks, Jeff! The file Adobe Setup Error.log contains the following information:
    02/14/14 07:20:26:474 | [INFO] |  | OOBE | DE |  |  |  | 8860 | DEVersion: 5.0.0.0
    02/14/14 07:20:26:475 | [INFO] |  | OOBE | DE |  |  |  | 8860 | Loading library from C:\Program Files (x86)\Common Files\Adobe\OOBE\PDApp\DECore\DE5\Setup.dll
    [    8860] Fri Feb 14 07:20:26 2014  INFO
    ::START TIMER:: [Total Timer]
    CHECK: Single instance running
    CHECK : Credentials
    Load Deployment File
    CHECK : Another Native OS installer already running
    Create Required Folders
    Assuming uninstall mode
    Lookup for master payload
    [    8860] Fri Feb 14 07:20:26 2014 ERROR
    DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
    [    8860] Fri Feb 14 07:20:26 2014  INFO
    :: END TIMER :: [Total Timer] took 6.90443 milliseconds (0.00690443 seconds) DTR = 579.338 KBPS (0.56576 MBPS)
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 1 error(s), 0 warning(s)
    ERROR: DW040: The product "{893B3B44-0A1E-404B-8FE8-0A74509102A9}" is not installed. Cannot proceed with the uninstall
    Please search the above error/warning string(s) to find when the error occurred.
    These errors resulted in installer Exit Code mentioned below.
    Exit Code: 33 - The product is not installed, cannot uninstall.
    Please see specific errors and warnings for troubleshooting. For example, ERROR: DW040 ...

  • After downloading the mac os x 10.6.8 I can't open safari. It first told me that I could not run it with Safari 5.1 so I downloaded safari 6 because I had read that that would solve the problem. However I am still getting an error message. HELP!!

    After downloading the mac os x 10.6.8 I can't open safari. It first told me that I could not run it with Safari 5.1 so I downloaded safari 6 because I had read that that would solve the problem. However I am still getting an error message. HELP!!

    I see this on Apple's support page:
    Available for: OS X Lion v10.7.5, OS X Lion Server v10.7.5, OS X Mountain Lion v10.8 and v10.8.1

  • Hello. the last month i face a problem with youtube at my macbook. most videos stop playing after maybe 20 - 25 sec. the same time the time bar stops moving. could you help me solve the problem? thank you

    hello. the last month i face a problem with youtube at my macbook. most videos stop playing after maybe 20 - 25 sec. the same time the time bar stops moving. could you help me solve the problem? thank you

    hello. the last month i face a problem with youtube at my macbook. most videos stop playing after maybe 20 - 25 sec. the same time the time bar stops moving. could you help me solve the problem? thank you

  • Hi There, my itunes no longer opens.  It quits unexpectedly for some reason when I try to login.  I have tried updating my itunes and this has not solved the problem.  Any help would be appreciated, thanks

    Hi There,
    My itunes quits unexpectedly when I try to login.  I cannot even open the application, not sure why this is happening.  Have upgraded my itunes and this has not solved the problem either.  If anyone can help me out, that would be appreciated.  Thanks

    Hello balisurfergal,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    Mac OS X 10.6: If an application quits unexpectedly
    http://support.apple.com/kb/PH7044
    iTunes 10 for Mac: May quit unexpectedly on launch
    http://support.apple.com/kb/TS3494
    Have a nice day,
    Mario

  • An error encounter on test devise (real devise) i.e "apple mach -o linker error linker command failed with exit code 1", please any body help me to solve the problem

    Hello, I am using tesseract api in my app, which run perfectly on simulator but on test devise (real devise) it is showing an error i.e "apple mach -o linker error linker command failed with exit code 1", please any body help me to solve the problem

    if you can't compile the webutil.pll in your forms developer you need to set the forms_builder_classpath in you windows registry. You have to add the frmwebutil.jar,jacob.jar to the registry key. The configuration files you mention are for running the forms.

Maybe you are looking for

  • How do you remove a potential malware on Macbook Pro?

    When I am opening new tabs in Google Chrome I get pop up widows looking like coming from Chrome, prompting update of browser as supposedly the video player is out of date. Looks suspicious as directs to zipCloud page. I have run iAntivirus, Avast and

  • Update set of books in implementation options ??

    we are doing project setup[ in one of the test instance , How ever while doing thta in implementation options set of books is saved incorrectly and now it is freezed (not able to change the set of books field) ..Navigation setup -->system-->implement

  • Style for a library

    I'm new to Dreamweaver after many years of making websites the 20th century way.  I realize I did this all backwards and should have started out with some kind of template, but I really, really don't want to redo all the work I've already done.  I ha

  • Does JMF require a particular a new jre version?

    Hi to all the JMF funs. I made a simple transmitting - receiving application with JMF211e. It works with jre 1.4.2_03 but it seems not working with another Pc that runs jre 1.3.1. No errors, only the receiver program doesn't run completely. is it pos

  • Reconcil FI and CO

    Hi all, How to Reconcilation the FI profit and CO Profit? is there any specific T.code for this? Thanks in advance. Soma