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

  • Home
  • SEARCH
  • 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 7919989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:03:11+00:00 2026-06-03T16:03:11+00:00

I’d like to ask: I’ve got any positive integer number, let’s say: 10 Then

  • 0

I’d like to ask:

  • I’ve got any positive integer number, let’s say: 10
  • Then I got random integer numbers (random count of them too), let’s say: 5, 7, 8
  • I want to calculate floating-point number such as: 5*x + 7*x + 8*x = 10
  • I got that a this moment, but I want to have it common lower boundary limit (let’s say 3), such as:

5 * x > 3
7 * x > 3
8 * x > 3

  • It is possible to correct the numbers (ratios) in order to achieve this state, so in this particular example it will be like this:
sum = 5 + 7 + 8 = 20
x = 10 (total) / 20 (sum)
x = 0.5

results: 5*0.5 + 7*0.5 + 8*0.5 = 2.5 + 3.5 + 4 = 10 (total)

So far so good, but 2.5 is now lower then a given min. limit 3, so how to solve this!

Is it possible, if so, how? (in C# preferably)

  • 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-06-03T16:03:16+00:00Added an answer on June 3, 2026 at 4:03 pm

    Let us take your example and see how WE would solve it.

    i shall change the use of 5x 7x 8x to the use of 5x 7y 8z because its already been decided that these MUST change to fit the requirements and therefore will not all be the same.

    So currently you get a total answer of 10 by having 
    
    5 times 0.5 = 2.5
    7 times 0.5 = 3.5
    8 times 0.5 = 4
    

    however, 5 times 0.5 is NOT greater than 3

    therefore to make 5 times x atleast 3 we must increase the total by 0.5

    as 3(the number you atleast want) – 2.5(the number you have) is 0.5

    so the TOTAL must increase by 0.5.

    as 5 times x must = 3 we can see that x must = 3 divided by 5 which gives us 0.6

    now lets recalculate your sum
    
    5 times 0.6 = 3
    7 tiems 0.5 = 3.5
    8 times 0.5 = 4
    

    all together = 10.5…ah, balls.

    ok so we can see that y or z must be made smaller to make sure that the answer is still exactly 10

    so lets pick 8 times z = 4 (as 4 is the furthers from 3 and will give us the most lee way)

    0.5 divided by 8 = 0.0625

    so z must decrease by 0.0625 to counteract the 0.5 increase from 5 times x

    so z now = 0.5 – 0.0625 which is 0.4375

    lets redo your sum with these new numbers!
    
    5 times 0.6 = 3
    7 times 0.5 = 3.5
    8 times  0.4375 = 3.5
    

    3 plus 3.5 plus 3.5 = 10! we nailed it! yaaay

    i hope this helped! if not well i enjoyed doing it anyway 😀

    To summarise, we had to increase x so that 5x was atleast 3, but the increase in x meant the answer was greater than 10, therefore either y or z had to decrease by whatver the total increasewas to counteract this, we do that increase divided by one of the other numbers, to figure out how much we need to subtract from z or y to make it = the perfect 10 again

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

Sidebar

Related Questions

I would like to count the length of a string with PHP. The string
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
For some reason, after submitting a string like this Jack’s Spindle from a text
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
i got an object with contents of html markup in it, for example: string

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.