probability

I have done some basic programming, but am a beginner. I am trying to write a program to calculate first order statistic distributions. so far i have a program to with
1. a loop to input a number of values and their respective probabilities
2. asks for sample size

#include <iostream>
#include <cmath>

using namespace std;

const int maxSS = 1000;

int main()
{
int values[maxSS];
double probs[maxSS];

int uss;
cout << "please enter the number of values possible : ";
cin >> uss;

for (int s = 0; s < uss; ++s)
{
cout << " Please enter sample value : ";
cin >> values[s];

cout << "Please enter sample prob : ";
cin >> probs[s];
{

int ss;
cout << "Please enter the sample size: ";
cin >> ss;

....


*I am unsure of a way or a function that can select a sample(of the input sample size) from the input values based on their probability

Any help is greatly appreciated. I am stuck.
huh, it's really really difficult to understand - why don't you try to give you variables some names, not ss, s, sss, uss or something...
Topic archived. No new replies allowed.