Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me solve this question using printf and scanf we need to use for loop 2. Write a program to find the largest of

please help me solve this question using printf and scanf

we need to use for loop

2. Write a program to find the largest of 20 random numbers and the number of times the maximum appears in the list. Declare variables. Seed the random number generator with the time of day. Initialize the variables for maximum and count. On each pass through a for loop

Generate a random number between 1 and 15, assign it to the random number variable, and print it.

Check to see if it is larger than the maximum. If it is a new maximum, assign to maximum. If the number is equal to the maximum add to count accordingly.

Upon exiting the loop, print the maximum and the number of times it appears in the list.

image text in transcribed

2. Write a program to find the largest of 20 random numbers and the number of times the maximum appears in the list. Declare variables. Seed the random number generator with the time of day. Initialize the variables for maximum and count. On each pass through a for loop .Generate a random number between 1 and 15, assign it to the random number . Check to see if it is larger than the maximum. If it is a new maximum, assign to . Upon exiting the loop, print the maximum and the number of times it appears in variable, and print it. maximum. If the number is equal to the maximum add to count accordingly. the list

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

What is the Agile Manifesto? AppendixLO1

Answered: 1 week ago