Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Define the structure and write a complete code that calls the function described above to ** generate 10 random numbers from 0, 1, 2, ...,
Define the structure and write a complete code that calls the function described above to **generate 10 random numbers from 0, 1, 2, ..., 49, and print them out.** This is in C. Thanks.
Project Objective: Review programming skills in under GLUE UNIX that includes: 1. file operations in C 2. command-line arguments in C 3. arrays, conditional statements, and loops 4. basic data processing techniques and problem solving skills Project Description Through the course of this assignment, you will develop a program that simulates the spread of COVID-19 and the effectiveness of prevention mechanisms. The project consists of two phases. In Phase I, you need to define a structure for the project and implement one function that will be useful for the project. After Phase 1 is due, the complete projection description will be posted with a suggested structure and the features that are required to be implemented for Phase II. Consider a closed community with a population of N people, out of which some have tested positive for COVID. Each day, a person may interact with some random number of people randomly from the population. If a healthy person interacts with one who has tested positive, the healthy person will get infected with a certain probability. If that happens, on the second day, the infected person will be considered as tested positive and may infect others whom he/she interacts with. After 14 days, the infected person will be fully recovered. There are several CoVID prevention mechanisms, (1) face mask: wearing face mask will reduce the probability that a healthy person being infected and the probability that a test positive person infecting others; (2) COVID vaccine: a person who is vaccinated will have a much lower probability of being infected; (3) quarantine: if a person who is tested positive is quarantined, he/she will not interact with anyone until he/she becomes healthy again (and thus will not infect anybody). Phase I questions: 1. Define a structure that captures all the features we have mentioned above. Note that in Phase II, we will announce a suggested structure, you can use either yours or the suggested one. 2. Implement a function that choose k distinct numbers randomly from 0, 1, 2, ..., n-1 (k
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started