Key in two numbers, DOS print  numbers between the two.

I need help with the syntax for keying in two integers, and then printing out what is > (greater than) the lowest number keyed in, and what is < (less than the second) the highest number keyed in.
Thanks

#! /usr/bin/pl -s
:- current_prolog_flag(argv, Argv),
    extractLimits(Argv, Lower, Upper),
    printRange(Lower, Upper),
    halt.
extractLimits([_], _, _) :- fail.
extractLimist([],_,_) :- fail.
extractLimits([Lower, Upper], Lower, Upper).
extractLimits([_|Tail], Lower, Upper) :-
    extractLimits(Tail, Lower, Upper).
printRange(Lower, Upper) :-
    Lower > Upper,
    printRange(Upper, Lower).
printRange(Lower, Upper) :-
    Index is Lower + 1,
    printRange(Lower, Upper, Index).
printRange(_, Upper, Upper).
printRange(Lower, Upper, Index) :-
    write(Index),
    nl,
    NewIndex is Index + 1,
    printRange(Lower, Upper, NewIndex).
    There. That should work for you. Now all you need to do is convert that to java. Good Luck!

Similar Messages

  • Swap phone numbers between two different accounts.

    I currently have two phone plans and two phones. One is on my mother's account and the other is a new phone I just started on my Fiance's account. They are completely separate from each other. My mother has a plan she own's and my fiance has a plan she owns.
    My question is; is it possible to swap numbers between the 2 phones? I want the number from my old phone that is on my mother's plan to be on my new phone that I just got. My mother plans on letting the other phone run out of contract and cancelling the line. I know I can swap the sim cards, but that would put my new phone on the wrong plan.

    Why didn't you perform an Assumption of Liability (AOL) to transfer your original line from your mother's account to your fiancé's account?

  • Can I switch phone numbers between two iPhones?

    I have ordered a 3GS, replacing my wife's 2G model. She will now get my 3G model. Do we have to change phone numbers or is there a way to move my 3G number with the 3GS and vice versa. It would be much better if that was possible.

    I also wish to switch phone numbers between phones. I just got off the phone with AT&T customer support. You can handle this over the phone. Need to have the two phones in hand at the time. I got through to customer support today with less than one minute on hold. I was quite surprised. AT&T must have really staffed up for the release.

  • Reallocating telephone numbers between two BT line...

    I have two BT lines coming into my house.
    Let's call them A and B
    Line A is currently used for both broadband and voice calls.
    Line B is currently used for voice calls only.
    The reason I have the broadband on line A is that line B can only provide a significantly lower broadband speed, although the lines are pairs from the same cable.
    I would like to transpose the telephone numbers on the two lines, so that line A would become the number on line B and line B would become the number on line A 
    This would enable me to have calls and broadband on the number originally allocated to B, and calls only on the number allocated to Line A
    I hope I have made that clear!
    Can someone tell me if it's possible to do this, and if so what I need to do to get it done?

    Hi Mac41
    I have just sent you a private message, if you can send us an email using the contact us form in the private message we can take a look at this for you.
    Thanks
    Stuart
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Can we swap numbers between two activated phones

    We added a line for my daughter but my husband wants the newer phone. Is there a way for him to keep his number on the new phone?

    Yes you can. If the 2 phones use the same size SIM card, the easiest way would be to swap the cards between the 2 phones. You can also do so in the owners MyVerizon account. You can also call CS or stop by a Verizon store.

  • Transfer SU numbers between WHs

    Hi all.
    We are using stock transport orders (STO) between two plants.
    The delivering and the receiving plant/storage location are NOT HUM managed, but have WM whit SU.
    We need use the same number of SU on the receiving WH that had on the delivering WH. Both WH handle the same range of numbers in SU.
    We hare making pick and pack (RF) ussing the SU number like HU number (this works OK, no problem), on the OBD assign the output procedure SPED to create automatically a IBD on the receiving WH (this works OK, no problem). The problem is when I create the TO to the IBD the system don´t assigne the HU number to the SU number on the TO.  According to SAP help the system should show me the "handling-unit overview"  but don´t make it, what is the problem? I´m right trying to pass the SU numbers between both WHs on this way?.
    Thanks
    PD. SAP HELP: "1. To create transfer orders, start at Inbound delivery and select Putaway u2192Create
    Transfer Orderu2192For Inbound Delivery.
    The initial screen for creating transfer orders for inbound deliveries appears.
    2. Enter the warehouse number and the inbound delivery.
    The handling-unit overview screen appears.
    The handling units that were created, along with some additional data, are listed on the
    Active worklist tab page
    To process all items at once, proceed with the putaway activities without making any
    further selections."

    Not answer. Closed

  • HT1343 if one is using windows 8.1 on a boot camped mac and you are using a mac keyboard . How does one unlock the numbers  on the larger wired keyboard ( numbers keys to the right of the keyboard) instead of having to use the numbers at the top of the ke

    Question: I am using a mac , wired Keyboard, on  a windows 8.1 platform ( this is because I have boot camped my hard drive) Unfortunately when I change over from my mac set up into the windows 8.1 the key board does not behave like it does when I am using as a mac. The numbers , on the right of the keyboard , no longer function and I have to use the numbers at the top of the keyboard, very annoying. Can anybody let me know how I unlock the numbers on the right of my keyboard?
    Regards CM

    I have stated every issue I’ve had so far in a fairly clear and concise way. I think if you read what I wrote, it all makes logical sense as to what is going on. Windows 7/8 would work just as well on a Mac if it was supported the same way the OS is for other OEMs.
    As I stated earlier in the post, I’m having these same issues in windows 8, not just 8.1, which is the reason for the post. I know the difference between supported by drivers and not supported by the manufacturer. The fact that when Haswell mbp’s came out and no revision to bootcamp for the new hardware was released to fix issues with installing windows on the new hardware shows Apple clearly Is not supporting bootcamp as strongly as they advertise.
    I am being realistic on Apple having drivers early. Anyone with an MSDN subscription can download the RELEASE version of windows months ahead of the actual release, I’m 100% sure if any average consumer can do that by paying $100 and saying they are a developer, apple can do it just as easily.
    You aren’t much help, you haven’t answered really anything to my post, nor have you contributed any knowledge that wasn’t clearly posted above, so don’t say anything if you don’t have anything to contribute.
    By the way, my rant is directed at apple, as you can see because I am saying “Apple, if you are going to…” because this is an Apple forum on Apple’s website. It is not directed to end users, clearly.

  • I'm using apple's bluetooth keyboard and I need an easy way to switch between the text and numbers fields instead of tapping on the screen

    I'm using apple's bluetooth keyboard and I need an easy way to switch between the text and numbers fields instead of tapping on the screen

    While not in edit mode:
    - if start typing numbers, then it enters number mode.
    - if start typing text, then it enters text mode.
    Using the arrow keys exits edit mode. So this should work for you:
    1 Type text into a cell, which enters text mode.
    2 Press Return to move to the next cell.
    3 Press right arrow key to exit edit mode.
    4 Press left arrow key to get back to the cell.
    5 Type a number, which enters number mode.
    Another method that requires more planning ahead of time is to format the cells as text or number before starting the data entry. Then when you navigate to a cell while in edit mode, you will be in the appropriate mode (without having to exit edit mode).
    This all works fine for me. Hopefullly it does for you also.

  • MacBook stuck with shift key enabled and numbers not working - even the keyboard app in languages wont type lowercase nor numbers?!  Anyone know whats up?  no spillage...cant understand why the keyboard app wont do anything.

    Anyone have a clue?  I can understand the keyboard being broke / shift key being stuck but why in the world would I not be able to type the numbers on the language keyboard app on the operating system?  Numbers show up on the app but when I press them I still get the special characters like #^&#* and it wont type lower case. Nothing has ever been spilt, just stopped working one day.  Rebooted from Time Capsule restore dated a month ago and its still doing it. (problem started two weeks ago).  Only way to get lower case or numbers to actually show up is the copy and paste.
    Any help would be amazing!
    Details on computer:  13 inch MacBook6, 1  (Late 2009) / Intel Core 2 DUO /  2.26GHZ / 2GB /  Memory running Mac OS X Lion 10.7.5

    If you can afford it, I would recommend replacing the topcase and keyboard as Apple suggests. If like me, you can't afford it or are open to a hack fix, then read on.
    The problem
    Yesterday, a little water spilt on my 13" MBP keyboard. I turned it around immediately, drained out the water and used tissue to suck it all up but the keyboard was still acting funny. I turned it off and left it out in the sun for a couple of hours and turned it on again but problems remained. Like Rickdubya, my warranty had run out just a month ago and I knew Apple would not cover this under warranty. I tried to clean the shift keys and left it overnight with some rice on them with hopes that the moisture might get sucked out. Nothing worked. (The rice bit is an urban legend that seems to work with some electronics). Went to the Apple Store this morning and was told that they wouldn't even take out the key and clean it, and that the entire top case would have to be replaced. A total bill of 156 Euros which I cannot afford. I had a USB keyboard that would let me use the Mac for the moment so I decided to try to work out a fix.
    Symptoms
    - Boots in safe mode everytime (which I later found out was because the shift key is pressed)
    - Cannot login because password is in lower case or has numbers
    - Cannot boot in super user mode and try to disable keys or override password as some commands won't work in uppercase (I wouldn't recommend this anyway because its super user mode)
    - All text is in caps and numbers are symbols as though shift key is always pressed
    - Audio doesn't work
    - Keyboard viewer would not always show the shift key pressed. The key seemed to get pressed at random
    Fix
    1. Hold the Option button down on boot to bypass the Safe Mode ensure a normal boot
    2. At the login screen, plug in a USB keyboard and enter your password to login
    3. Change your password to one that uses all caps and no numbers
    4. Download and install KeyRemap4MacBook .
    5. Use a combination of the functionalities of the Keyboard Viewer and KeyRemap4MacBook to figure out which shift key is the problem. In my case, I found out that it was only my left shift key.
    6. Disable the left/right shift key on KeyRemap4MacBook and click on the 'Reload XML' button to make that take effect.
    If only one shift key was the problem, then you are done. If both shift keys were shorted, then its likely other keys are too. In which case you should probably just replace the entire thing. If you think other keys are not affected, then you can use KeyRemap4MacBook itself to remap the shift functionality to a lesser used key like the Left Option key.
    7. Under System Preferences > Users & Groups > Login Items , add KeyRemap4MacBook as an application that should start on login. This will ensure that your disable/remap of the shift key is active everytime you login.
    Usage change/Things to remember
    1. Remember to hold down the Option key everytime the computer boots or reboots to bypass safe mode. The fix above is at the software level. The key is physically still shorted at the hardware level and will affect boot.
    2. Remember that at the login screen, the disable/remap is not active. So your password now has to be all caps and only letters.
    As soon as I can save some money, I will get my topcase and keyboard replaced but until then this solution works great with minimal change. Hope this helps!

  • How can I get the phone numbers in contacts to appear with dashes between the first 3 numbers, the next 3 numbers, and the last 4 numbers?  Until very recently it did so.  Contacts on my macbook pro does show up this way.  I do have a mobile me account an

    How can I get the phone numbers in contacts to appear with dashes between the first 3 numbers, the next 3 numbers, and the last 4 numbers?  Until very recently
    it did so.  Contacts on my macbook pro does show up this way.  I do have a mobile me account and in the past syncing was no problem.  What setting has changed?

    The phone number format as well as the date language and format and the time format are controlled by the Region Format setting. Go to Settings > General >International > Region Format.  When you change a region format, you can go back one page (to International) and see an example of the date/time/phone number format that your selected region format will produce.

  • Anyone know of a way to adjust the top and side MARGINS of a document printed from iOS numbers? The default margins are too wide. Need more working space.

    Anyone know of a way to adjust the top and side MARGINS of a document printed from iOS numbers? The default margins are too wide. Need more working space.

    Open the document,
    Tap the Tools icon (upper right).
    Tap Document Set up.
    Drag the margins to the position you wish (the actual margin width sould display as you are doing this).

  • I'm tring to install two Daqcard700​'s in same computer running Win2000 and Nidaq6.9.2 and the cards are not given two different device numbers by the NIDAQ device configurat​ion wizard.

    One Daqcard 700 and one daqcard 16x-50e in same machine work fine but two Daqcard 700's are not assigned two diferrent device numbers by the device configuration wizard.

    I have this same problem with the previously described observations.  I tried two Daqcard-700s in three different laptops, two with Windows XP and One with Windows 2000.  Tried all suggestions in Knowledgebase and Forum I could find with no luck.  Single cards work ok.  Removed and reinstalled drivers in Device Manager.  Tried the Windows 2000 patch for this problem.  Changed the PCMCIA adapters on the laptop to Generic Cardbus  Controller from one suggestion.  Running Labview 6.1 with Ni-Daq 6.9.3 and Max 3.1. Tried also Max 2.1.
    Any help will be greatly appreciated.
    thanks,
    Ben1167

  • How do I cancel the distance between the numbers? I'm having trouble copy phone numbers from the phone book and send it via SMS This problem I've found in the Arabic language, numbers appear in reverse Please help System 6.0.1

    How do I cancel the distance between the numbers?
    I'm having trouble copy phone numbers from the phone book and send it via SMS
    This problem I've found in the Arabic language, numbers appear in reverse
    Please help
    System 6.0.1

    MPEG-4 should not be used in FCP unless it is converted first or optimized in the application.
    Trash your preferences. Trash your project render files. Switch off background rendering. Do not re-render. Export your projects.
    Ignore the last frame and first frame indicators.

  • Two different page numbers on the same page

    Hi guys, I have this problem, in my documents I have a main numbering like this <$chapnum>-<$curpagenum> and a second composing a lot of file-cards, in this file there's a double numbering, the main flow global numbering, and the local numbering <$cupagenum>/<$lastpagenum>.
    I don't know how differentiate this numbering, I would like in the same pages something like : 1-329, 1-330, 1-331 and 1/4, 2/4, 3/4, 4/4.
    thank you!

    Ok thank you, I try. I have a techincal manual of 400 pages,
    at the end I have a Appendix with 100 technical file-cards,
    so the numbering is: from page 1 to 400 for the entire manual,
    from 300 to 400 for the file-cards.
    Every file-card is composed by about 10 pages
    and have its own numbering, each page is numbered
    like (1 of 10, 2 of 10 , CurrentPageOfThisCard of TotalPageOfThisCard)
    and this numbering is in a little text frame on the page.
    The first file-card is inserted after the page 299,
    the second file-card start at page 310, the third at 320, etc..
    So, for example, looking the second file-card, the first page of the card
    Is at page 310 of the manual, the second page at 311 and so on.
    The relation is only the position of the file-card in the manual.
    I need to autonumber these two levels of pages.

  • Nokia E6: Shortcut key to emergency numbers

    Hi, I had received a letter of advice (you can call it a letter of warning) from the local authority on nuisance calls made to the local emergency hotline. There had been a few instances of this issue happening, and I would like to find out if there is a shortcut key. I had the latest happened to me again yesterday and I think the local authority will be writing to me again very soon. I would like to do either of the following:- 1. Change the local emergency number to a invalid entry so that it shows up an error whenever I try to call. 2. Disable the emergency call totally 3. [last resort] get local mobile service provider to bar all emergency calls made from my phone Can anyone advise how 1 and 2 is to be done? Am not sure if the local mobile service provider will bar emergency calls... I appreciate any advice that you may have for me. Thank you.

    Hello.
    Most phones will dial 911 and 112 even if your keyboard is locked.
    The 1 to 9 numbers of the keypad can be programmed to dial a number if you press and hold one of them.
    If you try to mantain your keyboard locked and inside a case instead of the pocked there should not be unintentional calls.
    Greetings from Paraguay.
    Claudio Bogado Pompa.
    Greetings from Paraguay.
    Claudio Bogado Pompa.

Maybe you are looking for