Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3758004
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:05:41+00:00 2026-05-19T10:05:41+00:00

I need to express some numbers (for example, 1300, 500, 900) as a percentage

  • 0

I need to express some numbers (for example, 1300, 500, 900) as a percentage where the total would be 1 not 100.

There could 10 numbers and the could be in the range of 1 to 99,999, I guess.

I need to do some maths in my program to convert these numbers into the appropriate values.

I’m probably not explaining this well.

Don’t worry about the code, but heres what I need.

    [chart addSlicePortion:0.1 withName:@"Orange"];
    [chart addSlicePortion:0.2 withName:@"Fandango"];
    [chart addSlicePortion:0.1 withName:@"Blue"];
    [chart addSlicePortion:0.1 withName:@"Cerulean"];
    [chart addSlicePortion:0.3 withName:@"Green"];
    [chart addSlicePortion:0.1 withName:@"Yellow"];
    [chart addSlicePortion:0.1 withName:@"Pink"];

I need to produce the number 0.1, 0.2 etc. Notice that they add up to 1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T10:05:42+00:00Added an answer on May 19, 2026 at 10:05 am

    Divide each of the numbers by the total sum of all of the numbers. So,

    1300 / (1300 + 500 + 900) = 0.48148148148148148148148148148148
    500 / (1300 + 500 + 900) = 0.18518518518518518518518518518519
    900 / (1300 + 500 + 900) = 0.33333333333333333333333333333333
    

    Note that the sum of these numbers is

    1300 / (1300 + 500 + 900) + 500 / (1300 + 500 + 900) + 900 / (1300 + 500 + 900) =
    (1300 + 500 + 900) / (1300 + 500 + 900) =
    1
    

    You can also check this by adding the decimal expansions given.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, I have some CSS3 code: .iMore:not (.__lod ):active { color: #fff }
I am running sql server 2008 express and i need to schedule some stored
I've got Visual Studio 2008 express, and I need to use afx.h and some
I need to rewrite Java 1.5 project to java 1.4 (there are some tools
I've got and sql express database I need to extract some data from. I
I have an application that uses Express Checkout to process payments. I need some
Are there some special gotchas when accessing a project folder using IIS express in
Could really use some help with an update query...(SQL Serer 2008 R2 Express) I
I need to implement everyauth with node.js Connect (not Express), very securely. Despite the
I need to serve static swf using express framework generating dynamic view similar to:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.