Explore BrainMass

Explore BrainMass

    C program: counting numbers between 0-9

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write a C program that generates one hundred random integers between 0 and 9 and displays the count for each number.
    Make use of rand() to generate a random integer between 0 and 9. Use an array of ten integers to store the counts for the number of 0's, 1's, ... , 9's.

    © BrainMass Inc. brainmass.com March 4, 2021, 10:38 pm ad1c9bdddf
    https://brainmass.com/engineering/electrical-engineering/program-counting-numbers-between-348061

    Solution Preview

    Please find attached 348061.c that has been tested for successful compilation using "gcc -Wall 348061.c", and successful execution.

    Attached C program ...

    Solution Summary

    Attached C program source code has UNIX style newline endings, so make sure that you use a text editor (like Wordpad) that understands UNIX style newline endings, to view it properly on Windows.

    Solution also gives the output from an execution of the attached program.

    $2.49

    ADVERTISEMENT