Partially-filled Arrays
Write the function rindby() which stands for remove mark>if not divisiby by. The function removes all elements from the array that are not evenly divisible by the argument n. You can find out if a number is evenly divisible by n using the remainder operator: % (there will be nothing left over).
The function returns the number of items removed or -1 if the array was originally empty.
The function takes 3 arguments:
the array of int that may be modified.
the size of the array (use size_t as the type)
the int n used to check for divisibility
Here are two short examples:
int a[] = {2, 3, 4, 5, 6};
size_t size = 5;
int removed = rindby(a, size, 2);
// removed->2, a = [2, 4, 6], size = 3
size = 0;
removed = rindby(a, size, 3);
// removed-> -1, no change otherwise
In the first case, the numbers 3 and 5 are removed because they are not divisible by 2. Only the numbers that are divisible by 2 are left in the array.
In the second, size has been set to , so the input array is empty and the function returns - 1.
Exam C++ Quick Reference
p1.cpp
1 #include // size_t for sizes and indexes
2 using namespace std;
3
4 ////////////////WRITE YOUR FUNCTION BELOW THIS LINE ///////////////
5 int rindby(int all, size_t& size, int number)
6 {
7 int result;
8 // Add your code here
9 return result;
10 }
11

Answers

Answer 1

Answer:

um

Explanation:


Related Questions

Please describe how you can use the login page to get the server run two SQL statements. Try the attack to delete a record from the database, and describe your observation.

Answers

The only sure way to prevent SQL Injection attacks is input validation and parametrized queries including prepared statements. The application code should never use the input directly. ... Database errors can be used with SQL Injection to gain information about your database.

You modified the GreenvilleRevenue program to include a number of methods. Now modify every data entry statement to use a TryParse() method to ensure that each piece of data is the correct type. Any invalid user entries should generate an appropriate message, and the user should be required to reenter the data.
using System;
using static System.Console;
class GreenvilleRevenue
{
static void Main(string[] args)
{
const int fee = 25;
int lastYearsContestants;
int thisYearsContestants;
const int LOW = 0;
const int HIGH = 30;
int other = 0;
int dancer = 0;
int musician = 0;
int singer = 0;
WriteLine("**********************************");
WriteLine("* The stars shine in Greenville. *");
WriteLine("**********************************");
WriteLine("");
lastYearsContestants = getContestantsNum(message, LOW, HIGH);
string[] contestant = new string[thisYearsContestants];
string[] talent = new string[thisYearsContestants];
getContestantsInfo(contestant, talent);
for (int x = 0; x < talent.Length; ++x)
{
if (talent[x] == "O")
{
++other;
}
else if (talent[x] == "S")
{
++singer;
}
else if (talent[x] == "D")
{
++dancer;
}
else if (talent[x] == "M")
{
++musician;
}
}
Clear();
WriteLine("Currently signed up, there are..");
WriteLine("{0} dancers", dancer);
WriteLine("{0} singers", singer);
WriteLine("{0} musicians", musician);
WriteLine("{0} everything else!", other);
contestantByTalent(contestant, talent);
Clear();
contestantInfo(thisYearsContestants, lastYearsContestants, fee);
}
static int getContestantsNum(string message, int LOW, int HIGH)
{
WriteLine("Please enter the number of contestants for last year.>>");
string input = ReadLine();
int contestantsNum = Convert.ToInt32(input);
while (contestantsNum < LOW || contestantsNum > HIGH)
{
WriteLine("Valid numbers are 0 through 30, Please try again.>>");
contestantsNum = Convert.ToInt32(ReadLine());
}
return contestantsNum;
WriteLine("Please enter the number of contestants for this year.>>");
string input = ReadLine();
int contestantsNum = Convert.ToInt32(input);
while (contestantsNum < LOW || contestantsNum > HIGH)
{
WriteLine("Valid numbers are 0 through 30, Please try again.>>");
contestantsNum = Convert.ToInt32(ReadLine());
}
return contestantsNum;
}
static string getTalent(int contestantsNum)
{
bool correct = false;
string talentType = "";
while (!correct)
{
WriteLine("What is contestant " + contestantsNum + "'s skill? Please enter 'S' for Singer, 'D' for Dancer, 'M' for " +
"Musician, 'O' for Other.>>");
talentType = ReadLine().ToUpper();
if (talentType == "S" || talentType == "D" || talentType == "M" || talentType == "O")
{
correct = true;
}
else
{
WriteLine("Please enter a valid response.>>");
}
}
return talentType;
}
static void contestantByTalent(string[] contestant, string[] talent)
{
WriteLine ("To see a list of all contestants with a specific talent, Please enter a talent code.talent codes are(S)inger, (D)ancer, (M)usician, (O)ther; altenatively, you may type (E) to exit.>>");
string entry = ReadLine().ToUpper();
while (entry != "E")
{
if (entry != "S" && entry != "D" && entry != "M" && entry != "O")
{
WriteLine("That wasn't a valid talent code. Valid talent codes are (S)inger, (D)ancer, (M)usician, (O)ther; altenatively, you may type (E) to exit.>>");
entry = ReadLine().ToUpper();
if (entry == "E")
break;
}
for (int x = 0; x < talent.Length; ++x)
{
if (entry == talent[x])
WriteLine("Contestant " + contestant[x] + " talent " + talent[x]);
}
WriteLine("To see a list of all contestants with a specific talent, Please enter a talent code. talent codes are (S)inger, (D)ancer, (M)usician, (O)ther; altenatively, you may type (E) to exit.>>");
entry = ReadLine().ToUpper();
}
}
static void getContestantsInfo(string[] contestant, string[] talent)
{
for (int x = 0; x < contestant.Length; ++x)
{
WriteLine("What is the name for Contestant " + (x + 1) + "?");
contestant[x] = ReadLine();
talent[x] = getTalent(x + 1);
}
}
static void contestantInfo (int thisYearsContestants, int lastYearsContestants, int fee)
{
if (thisYearsContestants > lastYearsContestants * 2)
{
WriteLine("The competition is more than twice as big this year!");
WriteLine("The expected revenue for this year's competition is {0:C}", (thisYearsContestants * fee));
}
else
if (thisYearsContestants > lastYearsContestants && thisYearsContestants <= (lastYearsContestants * 2))
{
WriteLine("The competition is bigger than ever!");
WriteLine("The expected revenue for this year's competition is {0:C}", (thisYearsContestants * fee));
}
else
if (thisYearsContestants < lastYearsContestants)
{
WriteLine("A tighter race this year! Come out and cast your vote!");
WriteLine("The expected revenue for this year's competition is {0:C}.", (thisYearsContestants * fee));
}
}
}

Answers

Doin it for points sorry

1. Which of the following options can you use to format the contents of a cell?
Select all that apply.
a. Font Size
b. Sort
C. Italic
d. Underline

Answers

Answer:

a

Explanation:

The correct options are A, C, and D. Front Size, Italic, and Underline are the options can you use to format the contents of a cell.

You can also use the keyboard shortcuts Ctrl+B, Ctrl+I, and Ctrl+U to bold, italicize and underline a selection of text.

What is the use of format cells?

You can only alter how cell data appears in the spreadsheet by using cell formats. It's critical to remember that the data's value is unaffected; only how the data is presented has changed. The formatting options include options for fractions, dates, timings, scientific alternatives, and more.

Regular, Bold, Italic and Bold Italic are the four different sorts of font styles. Selected cells or ranges in a worksheet can have their font style changed. Changing the typeface involves the following steps: Pick the cell or cells that need to be changed. The text you want to format should be selected. Go to the Home tab and select Bold, Italic, or Underline. Ctrl + B will bold text. Ctrl + I will italicize text.

Thus, the correct options are A, C, and D.

Learn more about Format cell here:

https://brainly.com/question/24139670

#SPJ2

how can computers be a threat to public safety??

help asap marking brainiest ​

Answers

Loss or theft of your computer, smartphone or tablet. Malware, including spyware, on public computers. Theft of personal information from, or access to browsing history on public computers.

What is the grooming process as it relates to online predators

Answers

the process by which online predators lure in minors to get close enough to hurt them.

Problem: For multi access control, there are two approaches, those based on channel partitioning, and those based on random access. In packet switching, there are two rather similar approaches as well, namely, circuit switching and package switching. Discuss the similarities and differences in these two problem domains and the corresponding approaches g

Answers

The similarity between the two systems is the ability to connect many different communication devices and transfer data between a sender and a receiver. The main difference is the need for a connection for both to work.

We can arrive at this answer because:

Circuit and package quotation is very important for the connections of different communication devices.Furthermore, these two systems are used efficiently when a data transfer is required.However, even being used for the same purposes, they have many differences between them.The biggest difference is the need for a connection, as package switching is done without the need for a connection, while circuit switching needs a connection to act.

In addition, circuit switching is more widely used because of its ability to transfer data from one point to another via message transfer, while package switching is used when circuit switching is not available as it does the sending data more slowly across one drive.

More information:

https://brainly.com/question/7227504

How does tracking changes relate to sharing a workbook in Excel?

Answers

Answer:When you highlight changes as you work, Excel outlines any revisions (such as changes, insertions, and deletions) with a highlighting color. On the Review tab, click Track Changes, and then click Highlight Changes. Select the Track changes while editing. This also shares your workbook check box.

Explanation:

A workbook in excel is a file that contains one or more worksheets to assist you with data organization.

What is a workbook?

A workbook in excel is a file that contains one or more worksheets to assist you with data organization. A blank workbook or a template can be used to build a new workbook.

The Advanced tab of the Share Workbook dialogue box gives further choices for changing how Excel records change. For example, you may choose the "Automatically Every" radio option and enter a value in the "Minutes" text box. If you enter 10, Excel will store changes made by users every 10 minutes.

When you highlight changes while you work, Excel highlights any modifications (such as updates, insertions, and deletions) with a highlighting colour. Track Changes and Highlight Changes may be found on the Review tab. Select the Track changes while editing.

Learn more about Workbook:

https://brainly.com/question/10321509

#SPJ2

Turtle graphics windows do not automatically expand in size. What do you suppose happens when a Turtle object attempts to move beyond a window boundary

Answers

When a turtle object attempts to move beyond a window boundary, the turtle object stops because it cannot move outside the window boundary.

The turtle graphics window is simply a graphics window that is used as a playground when drawing turtles.

A turtle object is always in the turtle graphics window.

This in other words mean that, the turtle object cannot exceed the boundaries of the turtle graphics window

An attempt to move the turtle object outside its window will stop the turtle object;

This is so because the turtle object is always in the turtle graphic window, and it cannot move beyond it.

Read more about turtle graphics window at:

https://brainly.com/question/3070883

What is primary difference between the header section of a document and the body

Answers

Answer:

A HTML file has headers and a "body" (payload) — just like a HTTP request. The <body> encapsulates the contents of the document, while the <head> part contains meta elements, i.e., information about the contents. This is (typically) title, encoding, author, styling etc.

Explanation:

CAN I GET BRAINLIEST

Should people who are able to break a hashing algorithm be allowed to post their findings on the Internet?

Answers

Answer:

Cyber security is a very important aspect of digital world. Without cyber security our sensitive data is at risk. Its very important that companies keep our system safe by spotting any security vunerabilities. SO ACORDING TO ME I DO NOT THINK THEY SHOULD BE ABLE TO POST THEIR FINDINGS ON THE INTERNET As it may contain viruses

Today we see the advantages as well as disadvantages of a wired network. In comparison what technology would you recommend Wired Ethernet or a Wireless network technology for home and what would you recommend for business? Explain your answer

Answers

Answer:

wired network

Explanation:

Wired networks are generally much faster than wireless networks. ... This is mainly because a separate cable is used to connect each device to the network with each cable transmitting data at the same speed. A wired network is also faster since it never is weighed down by unexpected or unnecessary traffic.

hope that helps your welcome

Viewing digital content

Answers

Digital Content Creation Platforms offer content subscription or pay-as-you-go services for organizations. ... By offering access to this media, Digital Content Creation platforms make it so that organizations can share media of social interest while still complying with copyright laws.

Which statement best explains how the main idea relates to taking notes?

The main idea is always included in effective notes.
The main idea is always easy to identify.
The main idea is rarely used as a title for notes.
The main idea is rarely identified by listening or reading

Answers

Answer:

The main idea is always included in effective notes.

Answer:

a

Explanation:

I did the quiz

How does a computer work?

Answers

Answer:

A computer is a Device that can run multiple applications at a time and access the internet where you can find online stores and more also used to make video calls and more.

A computer system works by combining input, storage space, processing, and output. ... It is known as Computer Memory that keeps the data into it. A computer uses a hard drive for storing files and documents. It uses two types of memory, i.e., internal memory and external memory.

Write a program, using case statements, that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the numbers, the operator, and the result. For division, of the denominator is zero, output an appropriate message.

Answers

Answer:#include<iostream>

using namespace std;

int main() {

int var1, var2;

char operation;

cout << "Enter the first number : ";

cin >> var1;

cout << endl;

cout <<"Enter the operation to be perfomed : ";

cin >> operation;

cout << endl;

cout << "Enter the second nuber : ";

cin >> var2;

cout << endl;

bool right_input = false;

if (operation == '+') {

cout << var1 << " " << operation << " " << var2 << " = " << (var1 + var2);

right_input = true;

}

if (operation == '-') {

cout << var1 << " " << operation << " " << var2 << " = " << (var1 - var2);

right_input = true;

}

if (operation == '*') {

cout << var1 << " " << operation << " " << var2 << " = " << (var1 * var2);

right_input = true;

}

if (operation == '/' && var2 != 0) {

cout << var1 << " " << operation << " " << var2 << " = " << (var1 - var2);

right_input = true;

}

if (operation == '/' && var2 == 0) {

cout << "Error. Division by zero.";

right_input = true;

}

if (!right_input) {

cout << var1 << " " << operation << " " << var2 << " = " << "Error;";

cout << "Invalid Operation!";

}

cout << endl;

system("pause");

return 0;

}

Explanation:

Consider the conditions and intentions behind the creation of the internet—that it was initially created as a tool for academics and federal problem-solvers. How might that explain some of the security vulnerabilities present in the “cloud” today?

Answers

It should be noted that the intention for the creation of the internet was simply for resources sharing.

The motivation behind the creation of the internet was for resources sharing. This was created as a tool for academics and federal problem-solvers.

It transpired as it wasn't for its original purpose anymore. Its users employed it for communication with each other. They sent files and softwares over the internet. This led to the security vulnerabilities that can be seen today.

Learn more about the internet on:

https://brainly.com/question/2780939

30th Nov 2020. Difference between Data and Information

Answers

Answer:

Data is a collection of unstructured or unorganized facts and figures.

Information is a collection of processed data.

Hope it helps...............

Two categories of estimation mode

Answers

Answer:

The Standard Parametric Mode (SPM) and the Robust Parametric Mode (RPM) are two categories of estimation mode. These approaches turn the data distribution into an approximation normal distribution and then estimate the mode by using the probability density function of the estimated distribution as a guide.

Explanation:

Hope it helps:)

Natural language generation is focused on?

Answers

While natural language understanding focuses on computer reading comprehension, natural language generation enables computers to write. NLG is the process of producing a human language text response based on some data input. This text can also be converted into a speech format through text-to-speech services.

- BRAINLIEST answerer

Why do some computer systems not allow users to activate macros?
O Amacro can be used by only one person.
0 You must close all other programs to run a macro.
O The Word software does not work well with macros.
O Macros can carry viruses that can harm a computer.

Answers

Macros can carry viruses that can harm a computer.

Question # 1 Multiple Select Which features are important when you plan a program? Select 4 options. Knowing what information is needed to find the result. Knowing what information is needed to find the result. Knowing what the user needs the program to accomplish. Knowing what the user needs the program to accomplish. Knowing how many lines of code you are allowed to use. Knowing how many lines of code you are allowed to use. Knowing what you want the program to do. Knowing what you want the program to do. Knowing how to find the result needed. Knowing how to find the result needed.

Answers

Answer:

c

Explanation:

Answer:

Knowing what the user needs the program to accomplish.Knowing how to find the result needed.Knowing what information is needed to find the result.Knowing what you want the program to do

Explanation:

:D

How exactly do I answer questions?

Answers

Answer:

If you mean this website, click the add answer button on the question

Explanation:

Five jobs arrive nearly simultaneously for processing and their estimated CPU cycles are, respectively: Job A = 2 ms, Job B = 12 ms, Job C = 15 ms, Job D = 7 ms, and Job E = 3 ms.

Using FCFS, in what order would they be processed? What is the total time required to process all five jobs? What is the average turnaround time for each of these five jobs?

Answers

This is an example with solution:

Five jobs arrive nearly simultaneously for processing and their estimated CPU cycles are, respectively: Job A = 12, Job B = 2, Job C = 15, Job D = 7, and Job E = 3 ms.

a. Using FCFS, and assuming the difference in arrival time is negligible, in what order would they be processed? What is the total time required to process all five jobs? What is the average turnaround time for all five jobs?

Answer: The order of processing for the given jobs = A->B->C->D->E.

Total time needed to process all the jobs = 12+2+15+7+3 = 39 ms.

Turn around time for job A = 12 ms.

Turn around time for job B = 15 ms.

Turn around time for job C = 30 ms.

Turn around time for job D = 37 ms.

Turn around time for job E = 40 ms.

Answer : Therefore, the average turnaround time = (12+15+30+37+40)/5 = 26.8 ms.

Order of processing is A, B, C, D, E and Total time to process and Average turnaround time is 39 ms and 24 ms

Turnover time and order of processing:

Order of processing = A, B, C, D, E

Total time to process all five jobs = Job A + Job B + Job C + Job D + Job E

Total time to process all five jobs = 2 + 12 + 15 + 7 + 3

Total time to process all five jobs = 39 ms

Average turnaround time = [(2-0) + (2+12-0) + (2+12+15-0) + (2+12+15+7-0) + (2+12+15+7+3-0)] / 5

Average turnaround time = (2+14+29+36+39) / 5

Average turnaround time = 24 ms

Find out more information about 'Turnaround time'.

https://brainly.com/question/5768680?referrer=searchResults

Leon wants an output from his tablet. What should he look at? A. the memory chip B. the processor C. the screen D. the power button

Answers

Answer:

he should look at the screen

Answer:

C. The screen

Explanation:

got it on edge

Choose one piece of information your class can know, but you don’t want to share on your website. Why is it okay for your classmates and teacher to know it, but not to post it publicly?

Answers

Answer:

because other people you dont know can see it and it can sometimes not be good

Explanation:

Describe the two problems that appear in the construction of large programs that led to the development of encapsulation constructs.

Answers

Two problems that can lead to the development of encapsulation constructs when creating large programs are the complexity of data and the lack of security in sensitive data.

We can arrive at this answer because:

Encapsulation constructs are designed to prevent data from being invaded by unauthorized person.These constructions must be done without causing inconsistencies in the system, interfering with codes, and increasing the complexity of data. For this reason, large programs that present high complexity and difficult codes, demand the use of encapsulation constructs, so that their data does not become more complex.Encapsulation constructs are also necessary when there are flaws in data security and it is not possible to keep them away from the attack by intruders.

Although there are other ways to accomplish these goals, encapsulation constructs are widely used because of their simplicity and efficiency.

More information:

https://brainly.com/question/13438419

Fill in the blank: _____ data are statistical and numerical facts about a project.
Subjective



Quantitative



Mathematical



Qualitative

Answers

Quantitative data are statistical and numerical facts about a project that can be counted, measured or expressed using numbers.

Quantitative data is statistical and its nature is usually structured, it uses numbers and values that are most suitable for the analysis of a project.

The collection of quantitative data offers the possibility of statistical analysis.

This type of data allows you to easily measure and quantify facts in an organized and accessible way within relational databases.

Therefore, we can conclude that quantitative data is data that comes from numerical information, quantities, percentages, proportions and statistics.

Learn more about quantitative data here: https://brainly.com/question/96076

Given an array of String objects, use streams to count how many have a length less than or equal to three. StringLengthDemo.java

Answers

The array of String objects, use to count how many have a length less than

or equal to three is as follows:

string_object = ["brainly", "mathematics", "boy", "girl", "us", "joy", "key"]

x = []

for i in string_object:

   if len(i) <= 3:

       x.append(i)

print(len(x))

The code is written in python

The string array is declared.

Then an empty variable array is declared.

Then we loop through the array.

If any of the string length in the array is less than or equals to 3 , we append it to the empty array.

Then finally, we print the counted number of strings

learn more: https://brainly.com/question/22081416?referrer=searchResults

the reasons why business processes are necessary in a company

Answers

What is a business process?

Before knowing why they are necessary, let me explain what a business process is to be clear so you can understand a little bit more before I get to the meat. When a group of people work together to accomplish a certain goal, the process is called a "business process." A participant is assigned a task at each step of a business process. To put it another way, it serves as the foundation for several related concepts such as business progress management and process automation

The importance of a business process.

In big firms, having a business process is a must, and the advantages of doing so are immediately apparent. Organizations are made up of processes, which allow them to streamline and maximize the utilization of resources at the same time.

Reasons to have a well-defined business processIdentify which tasks are the most important to your larger business goalsImprove efficiencyStreamline communicationSet approvals to ensure accountability and an optimum use of resourcesPrevent chaos from lurking and lingering in your daily operationsStandardize a set of procedures to complete tasks that really matter to your business and tie it togetherReduction of risks from BPM softwareElimination of redundanciesMinimized costsImproved collaborationImproved productivity so that means more moneyHigher efficiencyHigher compliance

Answer:

Key reasons to have well-defined business processes

Identify what tasks are important to your larger business goals. Improve efficiency. Streamline communication between people/functions/departments. Set approvals to ensure accountability and an optimum use of resources.

What is the difference between (IF instructions & WHILE instructions )
0
를 들
T
!

Answers

Answer:

While statements determine whether a statement is true or false. If what’s stated is true, then the program runs the statement and returns to the first step. If what’s stated is false, the program exits the while and goes to the next statement. An added step to while statements is turning them into continuous loops. If you don’t change the value so that the condition is never false, the while statement becomes an infinite loop.

If statements are the simplest form of conditional statements, statements that allow us to check conditions and change behavior/output accordingly. The part of the statement following the if is called the condition. If the condition is true, the instruction in the statement runs. If the condition is not true, it does not. The if statements are also compound statements. They have a header (if x) followed by an indented statement (an instruction to be followed is x is true). There is no limit to the number of these indented statements, but there must be at least one.

Other Questions
YOU SHOULD BE USING THE IMPERFECT How can analogies shape our thoughts? Provide an answer. Need ASAP please is overload the act of exercising a muscle to fatigue Phosphorus reacts with oxygen to form diphosphorus pentoxide: 4 P(s) 5 O 2(g) ---> 2 P 2O 5(s) If 0.97 moles of phosphorus are reacted how many moles of P 2O 5 are produced Define Explicit Cost .[tex] \: \: [/tex] Mr. and Mrs. Bruce took a boat trip which left Cala for Friends Island at 11:45 in the morning. The trip lasted for 1 hour and 20 mins. When did they arrive at Friends Island? ng A trc khi cht c lm di chc cho v 100 triu, cn li chia u cho cc con v chu. Hy chia ti tn ca ng A?- TH1; Di chc ming khng hp php-TH2; Di chc ming hp phpBit ti sn ca ng A l 1 t cc con u thnh nin how do you use fossils to see change a ________ uses electronic memory and has no motors or moving parts. Which pair of functions are inverses of each other? What is domestic law. The nuclear equation shows the transmutation of a form of radon into polonium and an alpha particle. In one tho two sentences, explain whether or not the reaction is balanced. Explain why the 4th state of matter would and would NOT make an acceptable force field. h(x)=2x+5 for h(x+3)solve for h(x+3)pls help aaaaaaaaaaaa i what is better gacha club or gacha life Find the first partial derivatives of the function.z = (6x + 2y)^9dz/dx=dz/dy= an expression for the area of a rectangular piece of sheet metal is X^2+8x+12.An expression for the length of the same piece of sheet metal is x+6.Determine an expression for the width. even though candace already had a new job, she submitted her two week notice and conducted herself in a professional way at her old job because she didn't want to burn bridges. what does "burn bridges" mean?A - Candace didn't want to ruin her positive relationship with her old employer.B - Candace wasnt ready to start her new job.C - Candace was really going to miss her old job.D - Candace was waiting until her last day it in every one's face that she was leaving. A metal (FW 241.5 g/mol) crystallizes into a face-centered cubic unit cell and has a radius of 1.92 Angstrom. What is the density of this metal in g/cm3 HELP PLEASE!! NO LINKS , ILL GIVE BRAINLIEST