Your job is to write a basic blurring algorithm for a video driver. The algorithm will do the following: it will go through all pixels on the screen and for each pixel, compute the average intensity value (in red, green and blue separately) of the pixel and its 8 neighbors. (At the edges of the screen, there are fewer neighbors for each pixel.) Let's say the number of pixels on the screen is n. Then what is the order of the number of arithmetic operations (additions and divisions) required?
a. The number is order of n 4 .
b. The number is order of n2.
c. The number is order of n
d. The number is order of n3.

Answers

Answer 1
I’m pretty sure answer is B let me know if I’m wrong

Related Questions

Adjust list by normalizing When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by subtracting the smallest value from all the values. The input begins with an integer indicating the number of integers that follow. Assume that the list will always contain fewer than 20 integers. Ex: If the input is: 5 30 50 10 70 65 the output is: 20 40 0 60 55 The 5 indicates that there are five values in the list, namely 30, 50, 10, 70, and 65. 10 is the smallest value in the list, so is subtracted from each value in the list. For coding simplicity, follow every output value by a space, including the last one.

Answers

Answer:

I've implemented this program using python

userinput = int(input("Length: "))

mylist = []

mylist.append(userinput)

for i in range(1,userinput+1):

   userinp = int(input("Input: "))

   mylist.append(userinp)

smallval = mylist[1]

for i in range(1,len(mylist)):

   if smallval > mylist[i]:

       smallval = mylist[i]

for i in range(1,len(mylist)):

   mylist[i] = mylist[i] - smallval

for i in range(1,len(mylist)):

   print(mylist[i],end=' ')

Explanation:

I've added the full source program as an attachment where I used comments to explain difficult lines

The program written in python 3 deducts the least from a list of user given integers and prints the output. The program goes thus :

len_input = int(input())

#the number of inputs the user wishes to supply

vals = []

#initialize an empty list to accept the inputs

for i in range(1, len_input +1):

#use a loop to accept the user inputs

num = int(input())

#allow users to take in the inputs

vals.append(num)

#append each value to the list

least =min(vals)

#using the min function, obtain the lowest value from the list

output_vals = []

#initialize an empty list to hold the normalized values

for i in range(len_input):

#loop using a for loop

diff = vals[i] - least

#deduct the minimum value from each element in the list

output_vals.append(diff)

#append the values to the new list.

print(output_vals)

#display the output

A sample run of the program and the script is attached.

Learn more :https://brainly.com/question/14276852

what is the importance of human flourishing to science and technology?​

Answers

Explanation:

:*):*):*)*)*:)*:)*:*)*:**:*)*:)*:)*:*):*)*P:)*:*):*)

:*

):*

)*:

)*:*

):*):*)*:*):*)*:*):*):*):)*:*):*):*):*)

:*):*)

Write a program that reads in 10 numbers from the user and stores them in a 1D array of size 10. Then, write BubbleSort to sort that array – continuously pushing the largest elements to the right side

Answers

Answer:

The solution is provided in the explanation section.

Detailed explanation is provided using comments within the code

Explanation:

import java.util.*;

public class Main {

//The Bubble sort method

public static void bb_Sort(int[] arr) {  

   int n = 10; //Length of array  

   int temp = 0; // create a temporal variable  

   for(int i=0; i < n; i++){  

         for(int j=1; j < (n-i); j++){  

           if(arr[j-1] > arr[j]){  

               // The bubble sort algorithm swaps elements  

               temp = arr[j-1];  

               arr[j-1] = arr[j];  

               arr[j] = temp;  

             }  

         }            

         }  

        }

 public static void main(String[] args) {

   //declaring the array of integers

   int [] array = new int[10];

   //Prompt user to add elements into the array

   Scanner in = new Scanner(System.in);

   //Use for loop to receive all 10 elements

   for(int i = 0; i<array.length; i++){

     System.out.println("Enter the next array Element");

     array[i] = in.nextInt();

   }

   //Print the array elements before bubble sort

   System.out.println("The Array before bubble sort");

   System.out.println(Arrays.toString(array));

   //Call bubble sort method

   bb_Sort(array);  

               

   System.out.println("Array After Bubble Sort");  

   System.out.println(Arrays.toString(array));

 }

}

The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0, which is no wind, up to 12, which is a hurricane. The following script first generates a random force value. Then, it prints a message regarding what type of wind that force represents, using a switch statement. If random number generated is 0, then print "there is no wind", if 1 to 6 then print "this is a breeze", if 7 to 9 "this is a gale", if 10 to 11 print "this is a storm", if 12 print "this is a hurricane!". (Hint: use range or multiple values in case statements like case {1,2,3,4,5,6})

Required:
Re-write this switch statement as one nested if-else statement that accomplishes exactly the same thing. You may use else and/or elseif clauses.

ranforce = randi([0, 12]);
switch ranforce
case 0
disp('There is no wind')
case {1,2,3,4,5,6}
disp('There is a breeze')
case {7,8,9}
disp('This is a gale')
case {10,11}
disp('It is a storm')
case 12
disp('Hello, Hurricane!')
end

Answers

Answer:

The equivalent if statements is:

ranforce = randi([0, 12]);

if (ranforce == 0)

     disp('There is no wind')

else  if(ranforce>0 && ranforce <7)

     disp('There is a breeze')

else  if(ranforce>6 && ranforce <10)

     disp('This is a gale')

else  if(ranforce>9 && ranforce <12)

     disp('It is a storm')

else  if(ranforce==12)

     disp('Hello, Hurricane!')

end

Explanation:

The solution is straight forward.

All you need to do is to replace the case statements with corresponding if or else if statements as shown in the answer section

In 2-5 paragraphs, describe how technology helps business professionals to be more efficient.

Answers

The ways that technology helps business professionals to be more efficient is that  Business professionals may stay more organized, communicate more effectively, and keep firms secure with the use of technology.

Technology makes it simpler to connect with employees by utilizing e-mail and memos, and it helps keep employee information and corporate paperwork a lot more organized using computers and software.

How does technology improve the productivity of business people?

By streamlining time-consuming procedures, technology also increases office productivity. For instance, using document management software eliminates the need for manual data entry, filing, as well as in file retrieval.

Therefore, one can say that Technology can be used to safeguard private executive decisions, financial data, and other forms of proprietary information that gives a company a competitive edge. Simply simply, technology aids firms in protecting their ideas from rivals.

Learn more about technology from

https://brainly.com/question/1162014
#SPJ1

Create a class named Invoicing that includes three overloaded computeInvoice() methods for a book store: see pages 196 for examples… The 8% tax should be defined as a constant.
1. When computeInvoice() receives a single parameter, it represents the price of one book ordered. Add 8% tax and display the total due.
2. When computeInvoice() receives two parameters, they represent the price of a book and the quantity ordered. Multiply the two values, add 8% tax, and display the total due.
3. When computeInvoice() receives three parameters, they represent the price of a book, the quantity ordered, and a coupon value. Multiply the quantity and price, reduce the result by the coupon value, and then add 8% tax and display the total due.
Create a driver class named TestInvoice with a main() method that tests all three overloaded methods using the following data: Price $24.95 Price, $17.50, quantity 4, Price $10.00, quantity 6, coupon $20.00 Output printed to Eclipse Console:
Price $26.95
Price $76.95
Price $43.20

Answers

Answer:

Follows are the method to this question:

class Invoicing  //defining a class Invoicing  

{

  public static final double Tax = 8.0; //defining static variable Tax that holds a value

  public static double Total;//defining a double variable Total

  public void computeInvoice(double p1)//defining method computeInvoice that take double parameter

  {

      Total = p1 + p1 * (Tax / 100);//defining double variable Total that holds Price value

      System.out.printf("Price $%.2f\n" , Total);//print calculated value

  }

  public void computeInvoice(double p2, int q)//defining method computeInvoice that takes integer and double parameter

  {

      Total = p2 * q;//use Total variable that calculate Price with Tax

      Total = Total + (Total * (Tax/ 100));//calculate taxes on Total

      System.out.printf("Price $%.2f\n" , Total);//print calculated value

  }  

  public void computeInvoice(double p3, int q, double c)//defining method computeInvoice that takes one integer and two-double parameter  

  {

      Total = p3 * q;//use Total to calculate Total price

      Total = Total - c;//remove coupon amount from Total amount

      Total = Total + (Total * (Tax/ 100));//calculate taxes on Total

      System.out.printf("Price $%.2f\n" , Total);//print calculated value

  }

}

public class TestInvoice  //defining Main class TestInvoice  

{

  public static void main(String[] ar)//defining main method  

  {

      Invoicing  obm = new Invoicing ();//creating Invoicing class object obm

      obm.computeInvoice(24.95);//calling method computeInvoice

      obm.computeInvoice(17.5, 4);//calling method computeInvoice

      obm.computeInvoice(10, 6, 20);//calling method computeInvoice

  }

}

Output:

please find attached file.

Explanation:

In the above-given code, a class "Invoicing" is defined, inside the class two static double variable "Total and Tax" is defined, in which the Tax variable holds a value that is "8.0".

In class three same method, "computeInvoice" is used that accepts a different parameter for providing method overloading, which can be defined as follows:

In the first method, it accepts a single double parameter "p1", and inside the method, it uses the "Total" variable to calculate price value.In the second method, it accepts one integer and one double parameter "q and p2", and inside the method, it uses the "Total" variable is used to calculate the price with tax and print its value.In the third method, it accepts one integer and two double parameters "q, p3, and c", and inside the method, it uses the "Total" variable is used to calculate the price with tax and include tax and print its value.In the next step, the main class "TestInvoice" is defined inside the main method, Invoicing object is created and call its method.

Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMiles. Sample output for the given program:
Min miles: -10
Max miles: 40
Here's what I have so far:
import java.util.Scanner;
public class ArraysKeyValue {
public static void main (String [] args) {
final int NUM_ROWS = 2;
final int NUM_COLS = 2;
int [][] milesTracker = new int[NUM_ROWS][NUM_COLS];
int i = 0;
int j = 0;
int maxMiles = 0; // Assign with first element in milesTracker before loop
int minMiles = 0; // Assign with first element in milesTracker before loop
milesTracker[0][0] = -10;
milesTracker[0][1] = 20;
milesTracker[1][0] = 30;
milesTracker[1][1] = 40;
//edit from here
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] > maxMiles){
maxMiles = milesTracker[i][j];
}
}
}
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] < minMiles){
minMiles = milesTracker[i][j];
}
}
}
//edit to here
System.out.println("Min miles: " + minMiles);
System.out.println("Max miles: " + maxMiles);
}

Answers

Answer:

See Explanation

Explanation:

Your program is correct and doesn't need an attachment.

However, there's a mismatch in placement of curly braces in your program

{

}

I've made corrections to that and I've added the corrected program as an attachment.

Aside that, there's no other thing to be corrected in your program.

Use another compiler to compile your program is you are not getting the required output.

Which is an example of a function header in Python? left (40): def drawT(): left def

Answers

Answer:

B

Explanation:

Answer:

b  def drawT():

Explanation:

-Roll 2 standard dice
-If the sum of the dice are greater than 8, print “The sum of the dice is ____”
- print “done” at the end of the code

Answers

In python:

import random

die1 = random.randint(1,6)

die2 = random.randint(1,6)

if die1 + die2 > 8:

   print(f"The sum of the dice is {die1 + die2}")

print("done")

If you need me to change anything, I will. I hope this helps!

Which of the following domestic appliances does not use a magnet?
A. Fridge
B. Pressing iron
C. Radio
D. Fan​

Answers

Pressing iron isn’t domestic appliances
answer is the Pressing iron

Convert the following C program to C++.

More instructions follow the code.

#include
#include

#define SIZE 5

int main(int argc, char *argv[]) {
int numerator = 25;
int denominator = 10;
int i = 0;

/*
You can assume the files opened correctly and the
correct number of of command-line arguments were
entered.
*/
FILE * inPut = fopen(argv[1], "r");
FILE * outPut = fopen(argv[2], "w");

float result = (float)numerator/denominator;
fprintf(outPut,"Result is %.2f\n", result);

float arr[SIZE];

for( ; i < SIZE; i++) {
fscanf(inPut, "%f", &arr[i]);
fprintf(outPut, "%7.4f\n", arr[i]);
}

return 0;
}

Notice this is uses command-line arguments. I have provided an input file called num.txt that will be used when running the program. The output file is called out.txt.

Make sure you are using C++ style file I/O (FILE pointers/fopen) as well as regular I/O including the C++ style output formatting (fscanf, fprintf, formatting). Also use the C++ method of casting. The lines above that are bold are the lines that you need to convert to C++. Don't forget to add the necessary C++ statements that precede the main() function.

Answers

Answer:

The program equivalent in C++ is:

#include <cstdio>

#include <cstdlib>

#define SIZE 5

using namespace std;

int main(int argc, char *argv[]) {

int numerator = 25;

int denominator = 10;

FILE * inPut = fopen(argv[1], "r");

FILE * outPut = fopen(argv[2], "w");

float result = (float)numerator/denominator;

fprintf(outPut,"Result is %.2f\n", result);

float arr[SIZE];

for(int i = 0; i < SIZE; i++) {

fscanf(inPut, "%f", &arr[i]);

fprintf(outPut, "%7.4f\n", arr[i]);

}

return 0;

}

Explanation:

See attachment for explanation.

Each line were numbered with equivalent line number in the C program

How can a LAN be changed into a WAN?

Answers

Answer:

I hope the above picture may help you.

Yea what he said

(Sorry I just need these last points but I figured since probably no one else would answer that I could use these points so....sorry)

Write a loop to print 56 to 70 inclusive (this means it should include both the 56 and 70). The output should all be written out on the same line.

Sample run:
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

Answers

In python:

for i in range(56, 71):

   print(i, end=" ")

Answer:

for n in range(56,71):

   print(n, end=" ")

Explanation:

WILL GIVE BRAINLYIEST 3pts) Make a prediction about which material will be the best insulator and conductor of heat. Materials: aluminum, glass, fiber glass, air between glass, and brick:

a. I think the _____________ will conduct heat better.
b. I think the _____________ will insulate heat better.

Answers

Answer:

a. I think the Aluminum will conduct heat better.

b. I think the Fiberglass will insulate heat better.

Fiberglass is used to insulate most everyday items, so I can be sure that fiberglass can be the best insulator, as for aluminum it conducts heat like you wouldn't believe.

Note: Your answer doesn't have to be right, they just want you to make a prediction about your answer, that means it's alright to guess, also know I didn't guess I am just telling you that you didn't have to ask this question. <3

What is the missing line of code? >>> sentence = "Programming is fun!" 'gr O sentence[2:6] sentence[3:5] sentence[3:6] sentence[2:5]​

Answers

Answer: not sentence [3:6]

I hope this helps

Explanation:

what is a conditional format that displays a horizontal gradient or solid fill indicating the cell's relitive value compared to other selected cells

Answers

Answer:

Data bar

Explanation:

The answer to this question is data bar. Through the use of a day bar we are able to see trends in our data. They are very useful when it comes to visualization of values that are In a range of cells. Now if the bar is longer then the value we are visualizing is definitely higher. And if it is shorterr the value is lower. Several applications like excel has programmes that makes use of data bars especially for statistical purposes.

Select a cybersecurity career that interests you. Describe the job duties and identify the skills required to excel in that career. Then, make a career plan.

Answers

Answer:

it's business

Explanation:

business you started with small and work for it grow up.

Complete the sentence.
You can buy new applications at a retail store on DVD for ____.

O laptops
O smartphones
O tablets

Answers

Answer:

laptops

Explanation:

B

You can buy new applications at a retail store on DVD for laptops. Thus, option A (laptops) is correct.

What is a DVD?

A website is an accumulation of internet pages and related items that is posted on at least one server and given an unique domain name. Most blogs focus on a single subject or objective, such as reporting, education, industry, entertaining, or photo sharing.

A raster-based photograph designed for the web and publishing is stored as a JPG file. The JPG format is the default file format for image sensors and is the most widely used picture format on the web because of its universal compatibility and decompression. Portraits in both colour and black and white work brilliantly with them.

Therefore, option A (laptops) is the correct option.

Learn more about DVD, here:

https://brainly.com/question/13664390

#SPJ6

Which of the following tabs in the PowerPoint Ribbon is unique to PowerPoint,
not found in other Microsoft Office applications?
a.
b.
Home
Animations
Insert
View​

Answers

Answer:

The answer to this question is given below in the explanation section

Explanation:

The correct option for this question is Animation tab.

Animation tab in PowerPoint ribbon is a unique tab that is not found in other office applications such as in word, excel, outlook, publisher etc.

Because in PowerPoint you can use animation to make your slides animated and all animation can be managed and animation-related settings, you can find in the animation tab.

However, other tabs such as Home, Insert, and View are common in all office applications.

Plz answer me will mark as brainliest ​

Answers

Answer:

7. true

8.B

Hopefully those are correct!

Explanation:

Suppose one machine, A, executes a program with an average CPI of 1.9. Suppose another machine, B (with the same instruction set and an enhanced compiler), executes the same program with 20% less instructions and with a CPI of 1.1 at 800MHz. In order for the two machines to have the same performance, what does the clock rate of the first machine need to be

Answers

Answer:

the clock rate of the first machine need to be 1.7 GHz

Explanation:

Given:

CPI of A = 1.9

CPI of B = 1.1

machine, B executes the same program with 20% less instructions and with a CPI of 1.1 at 800MHz

To find:

In order for the two machines to have the same performance, what does the clock rate of the first machine need to be

Solution:

CPU execution time = Instruction Count * Cycles per Instruction/ clock rate

CPU execution time = (IC * CPI) / clock rate

(IC * CPI) (A) / clock rate(A) =  (IC * CPI)B / clock rate(B)

(IC * 1.9) (A) / clock rate(A) = (IC * (1.1 * (1.0 - 0.20)))(B) / 800 * 10⁶ (B)

Notice that 0.20 is basically from 20% less instructions

(IC * 1.9)  / clock rate = (IC * (1.1 * (1.0 - 0.20))) / 800 * 10⁶

(IC * 1.9)  / clock rate =  (IC*(1.1 * ( 0.8))/800 * 10⁶

(IC * 1.9)  / clock rate =  (IC * 0.88) / 800 * 10⁶

clock rate (A) =  (IC * 1.9) / (IC * 0.88) / 800 * 10⁶

clock rate (A) =  (IC * 1.9) (800 * 10⁶) /  (IC * 0.88)

clock rate (A) = 1.9(800)(1000000)  / 0.88

clock rate (A) =  (1.9)(800000000)  / 0.88

clock rate (A) = 1520000000  / 0.88

clock rate (A) = 1727272727.272727

clock rate (A) = 1.7 GHz

What is the maximum number of VLANs that can be configured on a switch supporting the 802.1Q protocol? Why?

Answers

Answer:

4096 VLANs

Explanation:

A VLAN (virtual LAN) is a group of devices on one or more LAN connected to each other without physical connections. VLANs help reduce collisions.

An 802.1Q Ethernet frame header has VLAN ID of 12 bit VLAN field. Hence the maximum number of possible VLAN ID is 4096 (2¹²).  This means that a switch supporting the 802.1Q protocol can have a maximum of 4096 VLANs

A lot of VLANs ID are supported by a switch. The maximum number of VLANs that can be configured on a switch supporting the 802.1Q protocol is 4,094 VLANS.

All the VLAN needs an ID that is given by the VID field as stated in the IEEE 802.1Q specification. The VID field is known to be of  12 bits giving a total of 4,096 combinations.

But that of 0x000 and 0xFFF are set apart. This therefore makes or leaves it as 4,094 possible VLANS limits. Under IEEE 802.1Q, the maximum number of VLANs that is found on an Ethernet network is 4,094.

Learn more about VLANs from

https://brainly.com/question/25867685

Write a program, weeklypay.m, that asks an employee to enter their hourly rate and the number of hours they worked for the week. Then have the program calculate and display their weekly pay. pay

Answers

Answer:

Follows are the code to this question:

def weeklypay(hour_rate,hour ):#defining a method weeklypay that accepts two parameters

   pay=hour_rate* hour#defining variable pay that calculate payable amount

   return pay#return pay value

hour_rate=float(input("Enter your hour rate $: "))#defining variable hour_rate that accepts rate vlue

hour=int(input("Enter total hours: "))#defining hour variable that accepts hour value

print('The total amount you will get $: ',weeklypay(hour_rate,hour))#call method and print return value

Output:

Enter your hour rate $: 300

Enter total hours: 3

The total amount you will get $:  900.0

Explanation:

In the above-given code, a method "weeklypay" is declared, which holds two value "hour_rate and hour" in its parameter, inside a method a "pay" variable is declared, that calculate the total payable amount of the given inputs and return its value.

In the next step, the above variable is used to input the value from the user-end and uses the print method to call the "weeklypay" method and print its return value.

Remove gray from RGB Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part.

Answers

Answer:  

Here is the C++ program:  

#include <iostream>   //to use input output functions    

using namespace std;   //to identify objects cin cout    

int main() {   //start of main method    

int red,green,blue,smallest;   //declare variables to store integer values of red,green, blue and to store the smallest value    

cout<<"Enter value for red: ";  //prompts user to enter value for red    

cin>>red;  //reads value for red from user    

cout<<"Enter value for green: ";  //prompts user to enter value for green  

cin>>green; //reads value for green from user    

cout<<"Enter value for blue: "; //prompts user to enter value for blue    

cin>>blue;   //reads value for blue from user    

//computes the smallest value  

if(red<green && red<blue) //if red value is less than green and blue values    

smallest=red;   //red is the smallest so assign value of red to smallest    

else if(green<blue)   //if green value is less than blue value    

smallest=green; //green is the smallest so assign value of green to smallest  

else //this means blue is the smallest    

smallest=blue;  //assign value of blue to smallest    

//removes gray part by subtracting smallest from rgb  

red=red-smallest; //subtract smallest from red    

green=green-smallest; //subtract smallest from green    

blue=blue-smallest; //subtract smallest from blue    

cout<<"red after removing gray part: "<<red<<endl;  //displays amount of red after removing gray    

cout<<"green after removing gray part: "<<green<<endl; //displays amount of green after removing gray  

cout<<"blue after removing gray part: "<<blue<<endl;  } //displays amount of blue after removing gray  

Explanation:  

I will explain the program using an example.    

Lets say user enter 130 as value for red, 50 for green and 130 for blue. So  

red = 130    

green = 50

blue = 130  

First if condition if(red<green && red<blue)   checks if value of red is less than green and blue. Since red=130 so this condition evaluate to false and the program moves to the else if part else if(green<blue) which checks if green is less than blue. This condition evaluates to true as green=50 and blue = 130 so green is less than blue. Hence the body of this else if executes which has the statement: smallest=green;  so the smallest it set to green value.    

smallest = 50    

Now the statement: red=red-smallest; becomes:    

red = 130 - 50    

red = 80    

the statement: green=green-smallest;  becomes:    

green = 50 - 50    

green = 0    

the statement: blue=blue-smallest; becomes:    

blue = 130 - 50    

blue = 80    

So the output of the entire program is:    

red after removing gray part: 80                                                                                                 green after removing gray part: 0                                                                                                blue after removing gray part: 80    

The screenshot of the program along with its output is attached.

The code below is supposed to display the name and score for the student with the highest score one time before the program ends. It is displaying Jim as the student with the highest score. It is displaying the highest score of 95. Unfortunately, Jim does not have a score of 95. Correct the following code:

Declare String students[SIZES] = {"Jen", "Jon", "Jan", "Joe", "Jim"}
Declare Integer scores[SIZES] = 70, 85, 72, 95, 90
Declare Integer index Declare Integer highest = scores[0]
Declare Integer highest Name = " " For index = 0
To SIZES //Assume that this translates to For (index = 0; index <= SIZES, index ++)
If scores[index] > highest then highest = scores[index]
End Of highestName = students[index]
End For Display "

The name of the student with the highest score is ", highest Name Display "The highest score is ", highest

Answers

Answer:

Modify

If scores[index] > highest then highest = scores[index]

End Of highest

Name = students[index]

End For Display

to

If scores[index] > highest then highest = scores[index]

Name = students[index]

End Of highest

End For Display

Explanation:

In the code, you posted the code segment that gets the name of the student with the highest score is outside the if condition that determines the highest.

To make correction, we only need to bring this code segment into the loop.

See Answer

Write a C program to prform simple C aritlimetic calculations. The user is to enter a simple expression(integer operaior integer) such as 15+30=45. The program is to exlract the 2 operands and the operator, perform the indicated calculation and display the result. For examole15 + 30 = 45. Operators should includc t, -, * , l, and %'.Operands are prcsitive integers, no sign. Use getchar to input the cxpression. Allow for variable spacing before the first operand and between operators and operands.

Answers

Answer:

Here is the C program:

#include <stdio.h>  //to use input output functions

//functions prototype

unsigned int mod(unsigned int a, unsigned int b);  

unsigned int mul(unsigned int a, unsigned int b);  

unsigned int sub( unsigned int a,unsigned int b);

float divide(unsigned int a,unsigned int b);  

unsigned int add( unsigned int a,unsigned int b);  

int main()  {  //start of main method

unsigned int a, b;   //declare variables to store the operands

char d;  //declare variable to store the operator

printf("Enter an operator:  ");   //prompts user to enter an operator

scanf("%c",&d);  //reads the operator from use

getchar();  //gets a character

while (d!='q')   { //keeps iterating until user enters q to quit

printf("Enter 1st operand: ");   //prompts user to enter first operand

scanf("%d",&a);   //reads first operand from user

getchar();  //reads character

printf("Enter 2nd operand: ");   //prompts user to enter second operand

scanf("%d",&b);   //reads second operand from user

getchar();  

if (d=='%')  {   //if the character of operator is a mod

printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = ");  //displays =

mod(a,b);  }  //displays computed modulo of two input operands

if (d=='*')   //if the input character is for multiplication operator

{printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = ");  //displays =

mul(a,b); }  //displays computed multiplication

if (d=='+')  {  //if the input character is for addition operator

printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = "); // displays =

add(a,b);  }   //displays computed addition

if (d=='/')  {  //if the input character is for division operator

printf("%d",a); // prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = ");  //displays =

divide(a,b);  }   //displays computed division

if (d=='-')  {  //if the input character is for subtraction operator

printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b); // displays operand 2

printf(" = ");  //displays =

sub(a,b);  }  //displays computed subtraction

printf("Enter an operator: ");   //asks again to enter an operator

scanf("%c",&d);  //reads operator from user

getchar();  }  }   //gets character

unsigned int mod( unsigned int a, unsigned int b){  //function to compute modulo of two integers with no sign

     int c = a%b;  //computes mod

    printf("%d",c);  }  //displays mod result

unsigned int add(unsigned int a, unsigned int b){     // function to compute addition of two integers

    int c = a+b; //computes addition

    printf("%d\n",c);  } //displays result of addition

unsigned int mul(unsigned int a, unsigned int b){       //function to compute multiplication of two integers

    int c = a*b;  //multiplies two integers

   printf("%d\n",c); }  //displays result of multiplication

float divide(unsigned int a, unsigned int b){   //function to compute division of two integers

    float c = a/b;  //divides two integers and stores result in floating point variable c

    printf("%f\n",c);  } //displays result of division

unsigned int sub(unsigned int a, unsigned int b){       //function to compute subtraction of two integers

    int c = a-b;  //subtracts two integers

    printf("%d\n",c);  }  //displays result of subtraction

Explanation:

The program is well explained in the comments mentioned with each line of the program. The program uses while loop that keeps asking user to select an operator and two operands to perform arithmetic calculations. The if conditions are used to check what arithmetic calculation is to be performed based on user choice of operand and calls the relevant function to perform calculation. There are five functions that perform addition, modulo, subtraction, division and multiplication and display the result of computation. The screenshot of output is attached.

The government of a country wants to know how much inbound tourism (number of tourists visiting from other countries) is contributing to the country’s economic prosperity. The research firm hired to conduct this study surveys 10,000 residents on their favorite spots to visit in the country and how much money they spend on leisurely activities

a. How could the use of a sample like this threaten the value of the study’s outcomes?

b. How might the flawed sample affect the usefulness of the results?

Answers

Answer and Explanation:

A. The study by the research team may not reflect the purpose of the research which is to know how much inbound tourism is contributing to the economy. They are sampling the population on their favorite spots to visit( which may be too narrow here) and what their leisure activities are (which are not the only things tourists spend on). Also 10000 residents may be too small as a sample to reflect more accurate study outcome representative of the population.

2. A flawed sample which is a sampling error would not represent the population as the results from sample would contradict population results

how many basic element makes up a computer system​

Answers

Answer:

4

Explanation:

Input/output, datapath, control, and memory

There wrong its C bold it.

:)))))

The fraction 460/7 is closest to which of the following whole numbers?

Answers

I don’t see any of “the following numbers”

Which of the following behaviors is considered ethical?

copying another user’s password without permission
hacking software to test and improve its efficiency
using a limited access public computer to watch movies
deleting other user’s files from a public computer

Answers

Answer:

using a limited access public computer to watch movies

Explanation:

Cause it doesn't involve you performing any illegal actions.

Answer:

C. using a limited access public computer to watch movies

Explanation:

IM A DIFFERENT BREEED!!

PLUS NOTHING ELSE MAKES SENSE LOL!

Other Questions
how should I feel about my dad having a massive heart attack and being rushed off to the hospital? Drag numbers to complete the table for missing values of x, x2, and x3. What do you need if you have to write the equation of a parabola? Select all the correct answers.What were two effects of OPECs 1973 oil embargo on the US economy?The price of oil rose dramatically.The government began importing oil from Venezuela.The United States joined OPEC.The United States faced a severe oil shortage.The US government instructed car manufacturers to produce fewer cars. Please answer this for me :) Read this excerpt. The word "strategies" can bestbe replaced byAtimetables.Borders.plans of action.Dmilitary tactics. are lines a and b parallel? and could you explain? Define waves in your own words. Find the midpoint between (0,0) and (-4,-12)(29) and (5,1) Kelly inherits land which had a basis to the decedent of $95,000 and a fair market value of $50,000 on August 4, 2018, the date of the decedents death. The executor distributes the land to Kelly on November 12, 2018, at which time the fair market value is $49,000. The fair market value on February 4, 2019, is $45,000. In filing the estate tax return, the executor elects the alternate valuation date. Kelly sells the land on June 10, 2019, for $48,000. What is herrecognized gain or loss? ($1,000) ($2,000) ($47,000) $1,000 None of the above Escoge la opcin adecuada para que esta oracin sea correcta gramaticalmente.Yonadar en la laguna.quierescierraentiendenpiensoprefieroquiereprefiere 5. How did Solon change how Athens was governed? Why were colonists so upset about the Proclamation of 1763? A. Colonists wanted to have slaves and rum, but the Proclamation of 1763 stated that these things were illegal. B. Colonists wanted representation for the heavy taxes they were required to pay as stated in the Proclamation of 1763. C. Colonists wanted to have their own separate country from Great Britain, but the Proclamation of 1763 said they could not create a new country. D. Colonists wanted to move west into lands that they rightfully gained in winning the French and Indian War, but the Proclamation of 1763 would not allow them to move west of the Appalachian Mountains. A race car accelerates from rest to a velocity of +90 m/s over a distance of 423m. Determine the acceleration of the race car. f(x)=-4x+2 find f(x) when x=1 PLEASE HELP (Pluto)You can add food sources with extra health benefits, called (blank) to an animals diet to improve the healing process? Adjust list by normalizing When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by subtracting the smallest value from all the values. The input begins with an integer indicating the number of integers that follow. Assume that the list will always contain fewer than 20 integers. Ex: If the input is: 5 30 50 10 70 65 the output is: 20 40 0 60 55 The 5 indicates that there are five values in the list, namely 30, 50, 10, 70, and 65. 10 is the smallest value in the list, so is subtracted from each value in the list. For coding simplicity, follow every output value by a space, including the last one. a tennis ball is thrown straight up with an initial velocity of 22.5 m/s how much total time is the ball in the air A student decided to research primate psychology for their science project. They measured how long it took gorillas to adapt to their new habitat when moved from one zoo to another. They measured how long it took the new gorilla to interact regularly (more than 3 times per day) with the gorillas that already live there. Seven different cases were examined and the data collected. What can be said about the data? [GorillaTime to interact (days)12.523.138.343.352.763.273.4][Gorilla1234567Time to interact (days)2.53.18.33.32.73.23.4 ] A. The data is only measured to one decimal place, so it is not reliable. B. The data falls within similar ranges so it may be reliable. C. The data is reliable because there is only one outlier. D. The data may not be reliable because there is an outlier. Two integers have a difference of 18 and a sum of 2. What is the product of the two integers?