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 64309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:46:11+00:00 2026-05-10T18:46:11+00:00

I have to generate two random sets of matrices Each containing 3 digit numbers

  • 0

I have to generate two random sets of matrices Each containing 3 digit numbers ranging from 2 – 10

like that

matrix 1: 994,878,129,121

matrix 2: 272,794,378,212

the numbers in both matrices have to be greater then 100 and less then 999

BUT

the mean for both matrices has to be in the ratio of 1:2 or 2:3 what ever constraint the user inputs

my math skills are kind of limited so any ideas how do i make this happen?

  • 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. 2026-05-10T18:46:11+00:00Added an answer on May 10, 2026 at 6:46 pm

    In order to do this, you have to know how many numbers are in each list. I’m assuming from your example that there are four numbers in each.

    1. Fill the first list with four random numbers.
    2. Calculate the mean of the first list.
    3. Multiply the mean by 2 or by 3/2, whichever the user input. This is the required mean of the second list.
    4. Multiply by 4. This is the required total of the second list.
    5. Generate 3 random numbers.
    6. Subtract the total of the three numbers in step 5 from the total in step 4. This is the fourth number for the second list.
    7. If the number in step 6 is not in the correct range, start over from step 5.

    Note that the last number in the second list is not truly random, since it’s based on the other values in the list.

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

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer protected override bool ShowWithoutActivation { get { return true; }… May 11, 2026 at 10:01 am
  • added an answer What you suggest is a perfectly legal way to determine… May 11, 2026 at 10:01 am
  • added an answer std::find() should work: #include <stdio.h> #include <algorithm> #include <string> using… May 11, 2026 at 10:01 am

Related Questions

I have to generate two random sets of matrices Each containing 3 digit numbers
For testing purposes I have to generate a file of a certain size (to
I have a new app I'll be working on where I have to generate
At work I work closely with MS-Office. I have managed to generate some scripts
I have some very simple code to generate an assembly and invoke a method
I have created a Python file to generate a Mandelbrot set image. The original
I have a flex application that needs the ability to generate and execute JavaScript.
I have a project where I would like to generate a report export in
I have an application that uses window.open() to generate dynamic popups. Unfortunately, I've had
I have a PHP application and a need to generate a PDF with the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.