Issues and challenges - Pascal programming

  1. Normalize

    Create part of a program to convert a list of event occurrence counts, NumEvents, into a list of probabilities, by summing the values and then dividing each count by this sum. For example, when two dice are thrown, the results range from 2 to 12 dots. The frequencies of each of these results can be observed and tabulated to compare the particular dice throws to ideal dice (whose probabilities should be: 1⁄36,2⁄36,...6⁄36,...2⁄36,1⁄36,

  2. Horizontal Histogram

    Create part of a program to enter any number of values (say percentages) and to plot these out horizontally as bars that have a length proportional to the values input. The size of the bars may need to “grow” by some Factor. For example, the above frequencies of dice throws could be used as follows.

    Enter the number of bars 11 Enter the growth factor 3 Enter values of the bars
    1 2 3 4 5 6 5 4 3 2 1
    *** ****** ********* ************ *************** ****************** *************** ************ ********* ****** ***
  3. Intersection

    Given two INTEGER arrays A, and B, create a third array C, having the values that are common to both of the arrays A and B.

  4. KBIG

    Create a program to find the Kth largest value of an array A, of N different values.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Pascal programming Topics