Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C PROGRAMMING A file called RandomIntegers.txt maintains a list of random values. Sample file entries are as follows 130 19 412 337 162 794

IN C PROGRAMMING

image text in transcribed

A file called "RandomIntegers.txt" maintains a list of random values. Sample file entries are as follows 130 19 412 337 162 794 311 529 166 602 26 654 2896 We wish to see how many of the integers in this file begin with a specified digit (user-supplied). Develop a C program that asks the user to enter an integer (1-9), then displays the number of random integers that begin with this value. Also, if there is one, or more of these numbers print the percent occurrence. Use correct grammar like 'There is 1' vs. 'There are 2' Sample Input 1 1 Sample Output 1 There are 5 random numbers that begin with 1 These numbers occur 33.33% of the time Sample Input 2 5 Sample Output 2 There is 1 random number that begins with 5 This number occurs 6.67% of the time Sample Input 3 8 Sample Output 3 There are 0 random numbers that begin with 8

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

Students also viewed these Databases questions

Question

Explain strong and weak atoms with examples.

Answered: 1 week ago

Question

Explain the alkaline nature of aqueous solution of making soda.

Answered: 1 week ago

Question

Comment on the pH value of lattice solutions of salts.

Answered: 1 week ago