Write a program in C that generates a list of random numbers greater than or equ
ID: 3592396 • Letter: W
Question
Write a program in C that generates a list of random numbers greater than or equal to 0 and less than an upper limit of at least 100, stores them in a linked list, deletes adjacent numbers that are within 8 of each other and then prints out the list. The count of numbers and the upper limit on the numbers will be passed in on the command ine. You must check to make sure the count and upper limit have been passed in, print an error If you run this program multiple times with the same count and upper limit, you must get Create a thread for initial generation of the numbers and a separate thread for deleting message and exit if not. different lists of numbers. adjacent numbers You may: 1.) generate all your numbers in thread 1, then create thread 2 and have it run through the list deleting adjacent numbers.Explanation / Answer
the code so far
#include <iostream>
#include<conio.h>
void main()
{
int a[100],i,b=0; //declation
cout<<"enter the array "; //enter 100 number
for(i=0;i<N;i++) //for loop to gather data
{
cin>>a[i]; //arrays of 100 integers
if (a[i]>=100) //check whether the integers are greater or equal to 100
b++; //in crement
}
cout<<"the number of integers greater or equal to 100 is: "<<b;
getch();
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.