How to put decimal points in your calculator for mac only on Xcode.

I need help. I created an app for calculating division, multiplication, addition & Subtraction. But everytime I divide 5 / 4, I get 1 without a remainder. The calculator app in OS X has a remainder when I calculated the division problem. I searched on the internet for help, but all of them are iOS tutorials. HELP!!!!!!

OK. But someday I'll be able to get these decimals in the calculator so that 5 divided 4 doesn't say 1, but says 1.1 (1.3 in the Calculator app in OS X.) Here's the code once again:
- (IBAction) getSum:(id)sender;
    int addend1, addend2, sum;
    addend1 = [mathField1 doubleValue];
    addend2 = [mathField2 doubleValue];
    sum = addend1 + addend2;
    [mathAns setDoubleValue:sum];
- (IBAction) getDiff:(id)sender;
    int minu, subtrah, diff;
    minu = [mathField1 doubleValue];
    subtrah = [mathField2 doubleValue];
    diff = minu - subtrah;
    [mathAns setDoubleValue:diff];
- (IBAction) getPro:(id)sender;
    int mulcand, mulpiler, pro;
    mulcand = [mathField1 doubleValue];
    mulpiler = [mathField2 doubleValue];
    pro = mulcand * mulpiler;
    [mathAns setDoubleValue:pro];
- (IBAction) getQuote:(id)sender;
    int numer, denom, quote;
    numer = [mathField1 doubleValue];
    denom = [mathField2 doubleValue];
    quote = numer / denom;
    [mathAns setDoubleValue:quote];
If this question has been answered, then I'll continue my Xcode development. If not, i'll have to throw my project in the trash. Leave me a suggestion.

Similar Messages

  • How to put bullet points in your form?

    Where do I find bullet points/ numbers in Adobe Forms?

    Hi,
    Unfortunately, bullet point is not available in Adobe FormsCentral.
    However, you may use the following html code to display the bullet point- •
    Note:- Make sure the code is present in the exact pace of the bullet point, bullet will be only visible after the form is distributed or tested.
    Regards,
    Nakul

  • How do you change size of text cursor or 'insertion point' in adobe cc for mac?

    how do you change size of text cursor or 'insertion point' in adobe ID cc for mac?  I have looked everywhere.  It's possible in Windows and Word but not in Mac.  Please help.  I spend half my time trying to find that blinking upright bar.

    Thanks for your note but it’s still a skinny rod that seems to disappear.  Why can’t it become a little thicker so it doesn’t disappear no matter what size I have set the screen?  My poor old eyes aren’t what they used to be.  I do appreciate your answering and I’ll enlarge the screen so the blankety-blankety blinking rod is at least visible.  Nancy
    how do you change size of text cursor or 'insertion point' in adobe cc for mac?
    created by Peter Spier in InDesign - View the full discussion
    Cursor size is governed by the type size and will be be larger or smaller on screen depending on how close you are zoomed in.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6729964#6729964
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in InDesign by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How do you delete contacts from your phone for good without having it appear in the messages app?

    How do you delete contacts from your phone for good without having it appear in the messages app?

    Hi tieyce,
    You need to hook up your iPhone, select it under Devices, and then go to the Photos tab on the Device Profile, and uncheck Sync Photos, then sync. That should delete all photos that were downloaded from your computer.
    When you say you have 2 separate albums of the same sets of pictures, what 2 albums are you referring to? Can you provide us with names of those "duplicate" albums?
    Cheers,
    GB

  • How do I get an App store icon for Mac on my dashboard

    how do I get an App store icon for Mac on my dashboard

    Are you on 10.6.8 or Lion? It should have been placed there automatically during the install; otherwise, simply go to your Applications folder and drag the icon to the dock.
    If you're not on one of those OS versions, post back with your version.

  • How or where do I download Internet Explorer for Mac OS 10.7.5?

    How or where do I download Internet Explorer for Mac OS 10.7.5?

    Internet Explorer is only supported on Windows, so you can't use it on OS X. There are a lot of browsers like Safari, Firefox or Chrome for Mac, so try them. If you need Internet Explorer, you have to install Windows on your computer. See > https://discussions.apple.com/docs/DOC-3321

  • How do i sync iphone contacts with office for mac 2011?

    how do I sync iphone contacts with office for mac 2011?

    kennethfromrevere wrote:
    I manage all of my email in Outlook, delete email and trash it however the update isn't reflected in the Cloud and\or Apple email.  I have to then open up Apple mail and delete again. 
    Then something is setup incorrectly, which version of OSX are you on, and is this an iCloud mail address (@mac, @me or @icloud)
    From your description of the issue I suspect that it is Outlook that is incorrectly setup.

  • How do I ask photoshop elements to search for and only add pictures on my computer?

    How do I ask photoshop elements to search for and only add pictures on my computer?

    vbond0071 a écrit:
    Please tell me its a simple fix???
    [email protected]
    My suggestion:
    Read the help file carefully:
    http://helpx.adobe.com/elements-organizer/using/workspaces.html
    Now have a look at the the organizer display layout. Just over the main display panel where thumbnails are shown, there is a drop-down menu to choose the sort order. I assume you are on a recent version of Elements? If you are on PSE12 or 13 you can choose the chronological order (ascending or descending), the filename order, or the import batch. Additionally, if you are viewing an album you can have a manual custom sort.
    My other advice is that before you use the organizer, you take the time to read this help file carefully:
    Elements Organizer Help | Creating and editing catalogs
    The organizer is a very power tool if you understand what it can do and if you don't have misconceptions about how it works. It's a powerful toolset  based on catalogs. It can handle and manage folders and files, but that's not its main purpose. Its ability to manage the information included in the exif metadata of your files and the important information you enter with categories, keywords, captions, notes, ratings or the way you include pictures in albums, creations, stacks or version sets is very powerful.

  • How do i sync my iphone with outlook for mac 2011 calendar?

    how do i sync my iphone with outlook for mac 2011 calendar?

    Here are some instructions from Microsoft:
    http://support.microsoft.com/kb/2452489
    Alternatively, depending on where the data in Outlook is coming from, you could set up your phone to sync to the same account that Outlook is syncing with.  For example, my Outlook 2011 and my iPhone both sync to my work Exchange account, so I have that same calendar in both places.

  • I'm wondering how do i set up a fire wall for mac. is there a program or somthing?

    i'm wondering how do i set up a fire wall for mac. is there a program or somthing?

    OS X already includes a software firewall. Enable it in System Preferences > Security & Privacy.
    If you are using your own wireless network you are already beyond a hardware firewall, so it is unnecessary and redundant to enable it. Its use is justified if you intend to connect to a public network, or are otherwise using a LAN along with others who may not be trusted.

  • How can i download win 8 64x driver for mac early 2011

    hi my friends
    how can i download win 8 64x driver for mac early 2011

    How did you download it? Did you download it from withing Boot Camp Assistant and save it in accordance with the instructions? How did you try to install it? You install the Windows Support software from within Windows. Did you read and follow the Boot Camp installation guide and help files?

  • How do I extract 1 page of a pdf file? How do I send that as a original for mac and windows users?

    How do I extract 1 page of a pdf file? How do I send that as a original for mac and windows users?

    This is not really a Numbers question.  I will provide an answer but suggest you make the question relavent for the forum where you post.
    1) Open the PDF in Preview
    2) select the menu item "View > Thumbnails"
    3) select the page you wnt to share
    4) copy (by using the key combination <command> + c OR select the menu item "Edit > Copy"
    5) select the menu item "File >  New From Clipboard"
    6) save as a new name
    7) share the new file

  • How can i download and install yahoo messenger for Mac on OS X Yosemite?

    how can i download and install yahoo messenger for Mac on OS X Yosemite?

    If you need to purchase Snow Leopard contact Customer Service: Contacting Apple for support and service. The price is $29.00 plus tax. You will receive physical media - DVD - by mail.
    Third-party sources for Snow Leopard are:
    Snow Leopard from Amazon.com
    Snow Leopard from eBay
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store.
    Snow Leopard General requirements
    Mac computer with an Intel processor
    1GB of memory
    5GB of available disk space
    DVD drive for installation
    Some features require a compatible Internet service provider; fees may apply.
    Some features require Apple’s MobileMe service; fees and terms apply.

  • Is there any laser pointer tool in keynote for mac?

    Is there any laser pointer tool in keynote for mac?

    No there is not such a function built in to Keynote.
    There are many in the Mac App Store, search for mouse pointer.

  • How to set Decimal Point position from right to left Serial Read Evaluate Number within Range over RS-232

    I am new to Labview, I am communicating with a TQ8800 Torque meter via RS-232. The 16 digit data stream is as follows:
    D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
    Each digit indicate the following status :
    D0 End Word
    D1 & D8 Display reading, D1 = LSD, D8 = MSD
    For example :
    If the display reading
    is 1234, then D8 to D1 is :00001234
    D9 Decimal Point(DP), position from right to the left
    0 = No DP, 1= 1 DP, 2 = 2 DP, 3 = 3 DP
    D10 Polarity
    0 = Positive 1 = Negative
    D11 & D12 Annunciator for Display
    Kg cm = 81 LB inch = 82 N cm = 83
    D13 1
    D14 4
    D15 Start Word
    I am using a modified version of the basic_serial_write_read.vi. I am attempting to parse the 16 digit data stream extracting out the number and whether it is positive or negative. I am having trouble with the decimal point placement. Is there an example that could help me with this? After the number is parsed I am then comparing it to see if it is within +/- 9.2 N cm. If it is then the test passes. I am outputing the data to a file. I have included the vi. Also how can I check for different units of the annunciator. Any help would be appreciated.  Thank you.
    Attachments:
    basic_serial_read.vi ‏100 KB

    What is the definition of the End Word?  You will likely need to figure this out experimentally (the manual doesn't seem to define it).  Whatever it is, you should set that as the termination character and enable the termination character.  That will help you in keeping your messages in sync.  Just tell the VISA Reads to read more than a message should be, something like 30 should work nicely.
    The error you are seeing is a buffer overload.  This means that the instrument is sending data to you faster than you can process it.  So you need to figure out how to perform the read faster.  File IO is slow.  So you should put that into a seperate loop so that your loop does nothing but read the data from the port as quickly as the data comes in.  Use a queue to send the data from the reading loop to the logging loop.  This is known as a Producer/Consumer.
    And here is a cleaned up version of your code.  No need for your express VI or the formula node.  Some other general cleaning up also done to make it easier to read.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    serial read.png ‏80 KB

Maybe you are looking for

  • Safari no longer able to log into secured sites??

    " because it couldn't establish a secure connection to the server". This is the error message I've been getting when either logging in or visiting secured sites. I recently defragmented my powerbook, and don't know if this would have caused a securit

  • Reinstall/repair Apache Installation from base system

    Hi, I use Snow Leopard and I was not aware of the fact that php and apache2 comes with the base installation. I delete now some .so files like /usr/libexec/apache/modauthnfile.so, so I'm not able to start apache anymore. How can I reinstall apache so

  • Accessing webdynpro applications externally

    Dear all, We are using ESS in EP 6.0 SP18 and ECC 5.0 which is based on web dynpro.  When ever I acccess the Web Dynpro based ESS applications, the requests are going to http://portalserver:50000/webdynpro...etc. We need to make our ESS WebDynpro app

  • Umax Astra 1220U in Mavericks?

    Is it possible to continue to use a Umax Astra 1220U scanner in OS 10.9? The scanner is a hand-me-down.  If it came with software, the software would have been obsolete long ago. For years now I have been using Mattias Ellert's backends from http://w

  • File associatio​n

    Ok I got the suggestion on how to fix my thumb drive but can not try it because my son has change a file association somehow. Every time I try to open an application an EXE file it comes up to save it under downloads. It does not open just wants to s