What is an alternate to the % operator

I'm studying for a java exam, and on my study guide I have a question that asks to rewrite the following equation
a = b % c;
let a, b, and c be integers
how would i rewrite that without using the % operator?
any help?

long division, but I have no clue on how to do that in java code, the only thing I can think of is like for example, if you take 8/3 in java you prolly get 2 so then next step would be to increase 8 by 1 so that its 9 then they divide evenly, then i'm not sure what the next step is, and to do that in code efficiently without knowing what your values are I assume you would use some sort of itteration, and we haven't covered that in class yet, so the only other option would be an if else statement but I'm still not quite sure how to write it out anyway

Similar Messages

  • What does this message mean - The operation can't be completed because the item "12b" is in use.

    The operation can’t be completed because the item “12b” is in use.  What does this message mean.  It appeared as I was attempting to clear my time machine backup?

    Reboot your machine make sure Aperture doesn't start (as Lion is liable to do) and try it.

  • HT5568 What's up with this: The operation couldn't be completed. (NSURLErrorDomain error -3001.)(102)

    Have not been able to update to Safari 6.0.2 and iPhoto 9.4.2. Keep getting this message.
    "The operation couldn’t be completed. (NSURLErrorDomain error -3001.)(102)"
    Have checked it out online but responses are way to techy to understand. Using 27 inch iMac 3.1 Intel Core i5, 32GB memory

    you can find Safari here:
    http://download.cnet.com/mac/3151-20_4-0.html?tag=main;new
    the rest in Apple downloads, but the Apple servers are a bit overloaded.

  • What does this mean? "The operation couldn't be completed. (NSURLErrorDomain error -1012.)"

    I am trying to install updates but get this error...what does it mean?

    The SSL certificate for swscan.apple.com has expired. You need to wait for Apple to get it renewed.
    (107243)

  • Which package do I need for the == operator?

    Hi !
    I'd very much appreciate if someone could tell me what package I need for the == operator to function.
    Thanx
    Rebecca

    None! Just use to compare primitive types (not objects!).
    Take a look at Java language specification, it is the basis to Java programming.
    Regards.

  • HT201407 during a update of apple my iphone 3GS crashed an now the operating system wont load up..ive tried to reset the phone to the factory settings it took 4 hours an completed but my iphone still wont come on..what can i do to fix the problem? please

    during a update of apple my iphone 3GS crashed an now the operating system wont load up..ive tried to reset the phone to the factory settings using itunes it took 4 hours and completed but my phone still wont come on..what can i do to fix the problem? please help #

    In trying to include what information all that I could I should have specified I DON'T KNOW THAT IT WAS DEFINATELY JAILBROKEN when I took it to the apple store they told me there's no way for them to tell if it was jail broken or not. I'm only going by what ppl have told me COULD HAVE BEEN DONE TO THE PHONE. With that said the only thing I know for sure is that the apple tech at the Genius Bar told me that someone took control of my root menu in February & I've had no control of my phone since. I asked him how to regain control & how he knew his exact words were "oh that is out of our scope of capabilities here at this level & you would need an apple engineer to fix it". I said ok then how do I get an apple eng then? He laughed & said you can't!!!! To which I was furious I came home & called apple requesting to speak w/the fraud dept to file a report they said we don't have a fraud dept!! So after a 45 mn phone call again I left w/no answers.
    @TJBUSMC1973-
    I DON'T HAVE THOUSANDS OF DOLLARS TO SPEND HIRING AN ATTORNEY & Although I appreciate your suggestion I fail to how an attorney would be able to facilitate in any way since there's no suspect. I cannot prove that it's him doing it so I certainly can't pursue legal action w/no proof & no money. :'((
    Again I thank you for your advice but I don't think that will help.
    I was looking more for a TECHNICAL way to avoid this happening w/a new phone should I buy one or trying to get them out of my phone now! Such as installing some kind of software protection?? Someway to clear out the entire phone (other than factory reset which was done 10 x's w/no success, etc. if this person got in then there HAS TO BE A WAY OF GETTING HIM OUT, right????

  • I renamed a power point a file and now when I try to open it it keeps giving me the error code -108. If I try to open or copy it say: The operation can't be completed because one or more required items can't be found. (Error code -43). What do I do?

    I renamed a power point a file and now when I try to open it it keeps giving me the error code -108. If I try to open or copy it say: The operation can’t be completed because one or more required items can’t be found. (Error code -43). What do I do?

    Post in Microsoft's Powerpoint (Mac) message boards.

  • When i do file, save for web, i get an error that says " the operation could not be completed. The system cannot find the path specified." What can fix this?

    when i finish a file and try to "save for web", i get an error box saying The operation cannot be completed. The system cannot find the path Specified.
    What can i do or where do i look?

    ELEMENTS 12 AND ELEMENTS 13
    Upgraded to 13 Thinking might resolve the issue.
    Was working fine up until we had "Tech" come in the office and "up grade some stuff"
    then all of a sudden i started getting this message, something happened but i don't have a clue what.

  • When I try to make a new video, a window comes up that says,"The operation could not be completed," and then under it, it says,"No other information is available about the problem," what is happening and how do I fix it?

    when I try to make a new video, a window comes up that says,"The operation could not be completed," and then under it, it says,"No other information is available about the problem," what is happening and how do I fix it?

    Hi
    And without info - it's near to impossibly to help. Try my general troubleshooting note:
    Troubleshooting note
    When iMovie doesn't work as intended this can be due to a lot of reasons
    iMovie Pref files got corrupted - trash it/they and iMovie makes new and error free one's
    problem in iMovie Cache folder - trash Cache.mov and Cache.plist
    Creating a new User-Account and log into this
    This forces iMovie to create all pref. and cache files new and error free
    Event or Project got corrupted - try to make a copy and repair
    a Codec is used that doesn't work (even though iMovie and/or iDVD tries to / they fail in the end)
    version miss match of QuickTime Player / iMovie / iDVD
    preferences are wrong - Repair Preferences
    other hard disk problem - Repair Hard Disk (Disk Util tool - but start Mac from ext HD or DVD)
    External hard disks - MUST BE - Mac OS Extended (hfs) formatted to work with Video
    ( UNIX/DOS/FAT32/Mac OS Exchange - works for most other things - but not for Video )
    USB-flash-memories - usually do not work
    Net-work connected hard disks - usually do not work (most often not fast enough and WRONGLY FORMATTES as DOS etc)
    iPhoto Library got problems - let iPhoto select another one or repair it. Re-build this first then try to re-start iMovie. When iMovie starts-up it first look trough this iPhoto library and if faulty it all Halt’s.
    This You do by
    First -  close iPhoto
    Secondly - on start up of iPhoto - Keep {cmd and alt-keys down}
    Thirdly - now select all five options presented
    THEN - WAIT a long long time (>20 hours are not strange)
    free space on Start-Up (Mac OS) hard disk to low (<1Gb) - I never go under 25Gb free space for SD-Video (4-5 times more for HD)
    external devices interferes - turn off Mac - disconnect all of them and - Start up again and re-try
    GarageBand fix - start GB - play a few notes - Close it again and now try iMovie
    Screen must be set to million-colors
    Third-party plug-ins doesn't work OK
    Run "Cache Out X", clear out all caches and restarts the Mac
    Let Your Mac be turned on during one night. At about midnight there is a set of maintenance programs that runs and tidying up. This might help
    Turn off Your Mac - and disconnect Mains - for about 20-30 minutes - at least this resets the FireWire port.
    In QuickTime - DivX, 3ivx codec, Flip4Mac, Perian etc - might be problematic - temporarily move them out and re-try
    (I deleted the file "3ivxVideoCodec.component" located in Mac HD/Library/Quicktime and this resolved my issue.)
    buenrodri wrote
    I solved the problem by removing the file: 3ivxVideoCodec.component. after that, up-dated iMovie runs ok.
    Last resort: Trash all of iMovie and re-install it
    Yours Bengt W

  • What exactly is this: The operation can't be completed because an unexpected error occurred (error code -50).

    When I try and create a new folder on an external hard drive or copy files I get this: The operation can’t be completed because an unexpected error occurred (error code -50)
    WHY? What does this mean?

    Linc. Only one hard drive displays this -50 problem. It is plugged directly into the computer but even though the answer i got (the link) only referenced iTunes, I DID unplug the hard drive and REplug into another port ON THE COMPUTER and even though it still is sllow to open when i click on it, the other problem seems fixed. Does all this mean the hard drive or (new) enclosure is faulty? In your opinion?

  • I tried to backup computer contents, but could not because "finder can't complete the operations becaus some data in "....JPG" can't be red or written (error code-36)"  What is this?

    Question:  I tried to backup my computer contents, cut coun't because "finder can't compelte the operation because some data in ........JPG (an iphoto image)
    can't be read or written (error code -36)  What is this error and how can I correct it?
    Thanks,
    betteyp

    I am backing up on two different drives...one is on the time machine...the one I am having trouble with is a passport that I back up manually.  I have not gotten a notice from the backup on the time machine that there is an error. 
    Before this error occured....the "event" that the photo was in emptied without me doing anything.  This has happened before, when the total number of pictures that I have downloaded for the day, the events emptied overnight without me doing anything (????????)
    Can you explain more what is happening.....
    Thanks

  • Hello! The question is this. In London, took the Iphone 5 as sim free, flew to Moscow put Simcoe, and he writes me that is locked to the operator O2. Can anyone encountered this problem? What to do? How to remove the Unlock?

    Hello! The question is this. In London, took the Iphone 5 as sim free, flew to Moscow put Simcoe, and he writes me that is locked to the operator O2. Can anyone encountered this problem? What to do? How to remove the Unlock?
    <Edited by Host>

    Look at your receipt. Does it say unlocked? It is possible to purchase both locked "sim free" and unlocked iPhones from Apple.
    ONLY the carrier an iPhone is locked to can legitimately unlock it.
    IF your receipt says that it was supposed to be unlocked, and it is not, call AppleCare. They should be able to straighten it out.

  • The operation can't be completed because an unexped error occurred (error code-50).   This appears when I'm copying a file to the drive and then I wasn't able to edit to my drive.  Then this morning I can't open my project file.  What to do?

    Message: The operation can't be completed because an unexped error occurred (error code-50).
    This appears when I'm copying a file to the drive and then I wasn't able to edit to my drive.
    Then this morning I can't open my project file.  I get this message: The project appears to be damaged, it cannot be opened.
    What should I do!??
    I  have moved my project onto 2 different external hard-drives now.

    Hi There,
    After looking around for this error, it seems to be related to OS, we would recommend you to contact Apple support for this.
    Thanks,
    Atul Saini

  • In iphoto i get this error for a video that I wanted to play - The operation couldn't be completed. (OSStatus error -54.) what is that error and how to fix it?

    The operation couldn’t be completed. (OSStatus error -54.)
    My Apple course instructor felt it would be smart to create all in iphoto dragging in all videos and photos to one spot.
    I now get these errors and they wont play.
    What is the error telling me and how do I fix it and get the video to play please??
    Is it true iphoto will be replaced in this New Year and if so does anyo

    No it didn't at all.
    I went to the finder and saw several of the same .
    When I called Apple they told me not to delete anything using the Finder… odd I thought, as that was the only way I could see the multiple videos and photos.
    Do you think there is any harm in deleting from there directly if I have a good playable copy?
    Thank you both for responses.
    The clips/videos some are from iPhone 4.
    I opened it manually and found 4 copies of most of the same videos, same names, some with slight variations. Don't know why.
    Some are titled from iphoto /Masters    don't know why that happened
    Now I also have some clips with white dotted line on grey where the clip used to be? why would that occur??
    In my finder there are now 97000 images. Yet I only have 22,000 in iphoto. Where are the rest located and why so many duplicates?
    Have I checked a box somewhere and need to address that?
    Thank you for any insight and guidance.

  • What version of iPhoto.  iPhoto 11 9.4.3 (720.91) -  What version of the Operating System. OSX 10.8.3 -  Detail.  I Attach my camera and the fields where the photos usually show up are empty and at the top of the screen it says all photos from camera are

    What version of iPhoto. iPhoto 11 9.4.3 (720.91)
    What version of the Operating System. OSX 10.8.3
    Detail.  I Attach my camera and the fields where the photos usually show up are empty and at the top of the screen it says all photos from camera are downloaded. But they are not. They can't be.
    I fixed the problem somewhat myself by removing the miniSD and manually inserting it. It did not populate automatically. I had to open iPhoto and then it populated only the most recent photos I had taken which fortunately were the only ones I need. No error messages this seems to be a new occurrence.
    Is there a way to just turn iPhoto off and download my photos to the folder of my own choosing?

    Sure - in the iPhoto prefercences set action when a camera is ocnnected to Image Capture
    LN
    Note - your cute formatting really does not add anything and makes your post hard to read and follow - try straight typing with no cute formatting in the future

Maybe you are looking for