Each year the Department of Traffic Accidents receives accident count reports from a number of cities and towns across the country. Given details of 'n' days, develop an algorithm and write a program to determine the average number of accidents and for each day, print the difference between the number of accidents on that day and average. For example, if the number of accidents is 5 and the values are 10, 12, 15, 13, 5 then average is 11 and the difference of values are 1, 1, 4, 2, 6 Use the following functions signature void read Count(int *, int); float find Mean(int *, int); void print_Diff(int *, int, float); For example: Test Input Result 10 1 12 4 15 13 5
Q: Insert the missing part to call myMethod from main.
A: When we have to call the method we write method name. If there is parameter we pass parameter otherw...
Q: nglish, where C(x) is “x is a comedian” and F(x) is “x is funny” and the domain consists of all peop...
A: Let us translate the following statements into English sentences, where C(x) =xx is a comedian F(x) ...
Q: A neural network of 2 convolutional layers each with 16 filters, kernel size = 2, stride = 1, and va...
A: A neural network is a network made up of neurons and perceptron’s. They have layers of three types n...
Q: Find a polynomial reduction from SAT to 3SAT
A: the answer is
Q: What exactly is a communication session?
A: Introduction: Face-to-face discussions, phone calls, text messaging, email, the Internet (including ...
Q: Use again the network architecture provided in the figure above, were Rs, Rc and Ri for i = {1,2,3,4...
A: Given :- Use again the network architecture provided in the figure above, were Rs, Rc and Ri for i =...
Q: What are the advantages and disadvantages of the bit-vector format for sets? What other ways may set...
A: Introduction: We just check the matching bit to see if a given number is prime. This type of represe...
Q: how do you undone concatenation. for example lets say i have the following encryption algorithm: E...
A: assuming that the limit is based on the size of allocated memory, concatenation causes undefined beh...
Q: What is a firewall's principal purpose? What are the general guidelines for using packet filtering?
A: What is a firewall's principal purpose?What are the general guidelines for usingpacket filtering?
Q: ort, and bubble sort in the language of your choice and compare their performance on random arrays o...
A: a) Before starting the array would be S H E L L S O R T I S U S E F U L n = 17, k = 17/2 = 8 ...
Q: What are the Consequences of a Lack of Communication Devices?
A: Introduction: A communication device is a piece of hardware that can send an analog or digital signa...
Q: Write a Python program to get the geometric mean of n numbers. Take the n numbers from the user.
A: Required:- Write a Python program to get the geometric mean of n numbers.Take the n numbers from the...
Q: Create a flowchart, algorithm and C++ program 17. Revise problem #9 Commission of the Salesman. If t...
A: algorithm:- read total sales. if total sales<=10000 commission=(total sales*10)/100 else if t...
Q: Which of the following is NOT an advantage of normalization? a) Multi-table queries run faster b) Mo...
A: Normalization means dividing the tables in order to reduce the redundancy present in the table. Simp...
Q: What are the potential connectivity challenges that one can encounter when connecting to your instan...
A: Introduction: What are the potential connectivity challenges that one can encounter when connecting ...
Q: Explain the components of the spheres of security paradigm in detail. Each component should be expl...
A: Here is the detailed explanation of the solution
Q: Which of the following answers are part of a well-structured relational database? Select all that ap...
A: Separate tables or linked data make up a relational database. A relational database is a collection ...
Q: Create a program that uses C language that solves the function below: f(x) = 3x = ex
A: C code for ex to show the value equal to f(x) #include <stdio.h> float exponential(int a, floa...
Q: Discuss why do you think an assessment of the financial stability of the vendor can be a critical co...
A:
Q: I need a C code of this: Input 1. Number of rows Constraints The value is guaranteed to be >= 3...
A: Please refer full code with output screenshot: #include<stdio.h> int main() { int r,...
Q: A retail company assigns a $5000 store bonus if monthly sales are more than $100,000; otherwise a $5...
A: Decision Structure: It decides the direction of the flow of program execution.A decision control str...
Q: What is the difference between a UNIQUE and a PRIMARY KEY constraint? (See the tables in the JustLee...
A: Introduction: When creating a table, a primary key is used to identify each row in the table, while ...
Q: To protect the sound quality of phone calls over a DSL network, what device must be installed?
A: The Splitter is a device that is used to protect sound quality of phone calls over a DSL network.
Q: Note: sales records is in sales table, purchase records are in purchases table, inventory records ar...
A: 1) since u have given only table names , i will assume the tables details as follows * conside...
Q: Write a Java program to print the content of linked list using the Iterator object.
A: LinkedList in java is essentially a piece of the assortment system present in java.util bundle. It i...
Q: The magic square is an arrangement of numbers in a square grid in such a way that the sum of the num...
A: Square numbers, usually positive numbers, are called magic squares when the numerical values in ea...
Q: When do DML updates become permanent in database tables?
A: Introduction: You may enter a DML statement in the Worksheet in the SQL Developer environment. Alte...
Q: site scr
A: Explanation: An attacker injects malicious executable scripts into the code of a trusted applicatio...
Q: below an OSPF topology (Figure 2). Identify all types of routers in this OSPF topology. d) What is...
A: As per guidelines, we can only solve one question at a time . Hence resubmit the question for furthe...
Q: 1. Design and use interfaces Write a class named Octagon that extends GeometricObject and implements...
A: Actually, program is an executable software that runs on a computer.
Q: What distinguishes proxy servers from NAT?
A: According to the question NAT are comes in the network layer branch and conduct the proxy applicatio...
Q: malised already upto
A: Primary key for the relation = {Hairdresser ID, SkillID} The FDs on the relation are Hairdresser ID ...
Q: 1. Create a web page which should contain a table having two rows and two columns. 2. fill in the da...
A: Here is the approach :- Table tag is used to create the table. inside the table tag we need the t...
Q: Create a flowchart, algorithm and C++ program. 18. identify if the inputted letter is a Vowel or Co...
A: Given : Create a flowchart, algorithm and C++ program. Identify if the inputted letter is a Vowel or...
Q: Suppose you were to open a shift register component. Inside you would notice two (2) registers. Iden...
A: Ans: You were to open a shift register components ,inside it noticed that it has two internal regist...
Q: A combinational logic circuit has one output (F) and four inputs (a, b, c, and d). The circuit is de...
A: Ans.) abd and abc'
Q: Write a class Point for 2D Cartesian co-ordinates. The class should have 2 fields: abscissa(x) anc o...
A: As mentioned in the question im writing a class point for 2D Cartesian co-ordinates
Q: IP addressing technique subnets a subnet to make smaller subnets?
A: Here we have to answer the IP addressing technique that subnets a subnet to make smaller subnets.
Q: In a database, how can you utilize a sequence?
A: Introduction: A sequence is a schema-bound object that is user-defined that creates a succession of ...
Q: Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's repre...
A: The while loop is used to iterate a part of the program repeatedly until the specified Boolean condi...
Q: e and cu
A: Code: #include<iostream>using namespace std;int main(){ int x,square,cube; cout << "Pl...
Q: Which of the following was taught as a requirement about using PIVOT() queries place the highe...
A: Here First Know about PIVot() --In simple words using pivot convert data rows into columns.
Q: Given two tables created and populated as follows: CREATE TABLE dbo.envelope(id int, user_id int...
A: What will the result be from the following query: UPDATE docs SET doctext=pageseq FROM docs INNER ...
Q: Q2- Write a matlab program to read three numbers and print them in descending order. Use if statemen...
A: arr = []; for i = 1:3 num = input('Enter number : '); arr(end+1) = num; end t = 0; j = 3; for i=...
Q: Some people think that expert system does not kill jobs but transform business models. Discuss using...
A: Expert system add value to the business as it provide wonderful advice to grow the business and work...
Q: What were the advantages of using inheritance in this situation vs. an interface? What might be a mo...
A: answer is
Q: Define and describe 'formal and informal communication' citing the types thereof. Delineate the meth...
A: Given: V We need to define and describe formal and informal communication and its types . Delineate ...
Q: how l read file txt in my computer
A: Given :- how l read file txt in my computer
Q: What are the goals of information security in the digital age? Give a brief explanation.
A: Introduction: In a word, digital security is the protection of your computer, mobile devices, tablet...
Q: You’ve just finished fitting a logistic regression model for email spam detection, and it is getting...
A: Given AUC value of training dataset is 0.55 AUC value of validation dataset is 0.53 The size of the ...
Step by step
Solved in 4 steps with 2 images
- Suppose you have a certain amount of money in a savings account that earns compound monthly interest, and you want to calculate the amount that you will have after a specific number of months. The formula, which is known as the future value formula, is:F=P×(1+i)tThe terms in the formula are as follows:o F is the future value of the account after the specified time period.o P is the present value of the account.o i is the monthly interest rate.o t is the number of months.Write a program that prompts the user to enter the account’s present value, monthly interest rate, and the number of months that the money will be left in the account. The program should pass these values to a function named futureValue that returns the future value of the account, after the specified number of months. The program should display the account’s future value. i attached the screenshot of the output so the output should look like that.The Research team led by Bernadette Wolowitz at Cal-tech University has discovered a new Amoeba that grows in the order of a Fibonacci series every month. They are exhibiting this amoeba in a national. conference. They want to know the size of the amoeba at a particular time instant. If a particular month's index is given, write a program to display the amoeba's size. For Example, the size of the amoeba on month 1, 2, 3, 4, 5, 6,... will be 0, 1, 1, 2, 3, 5, 8.... respectively.You can find out how many seconds have elapsed since Jan 1, 1970 using the time() function. #include <time.h> now = time(NULL); // now is more than a billion seconds (which data type should you use?) Write a program that estimates how many years, months, weeks, days, and hours have gone by since Jan 1 1970 by calculations with the number of seconds that have passed. The number of months must be less than 12, i.e., take out how many years have gone by first, then how many months are left, then weeks, etc. Assume that all years have 365 days, and all months have 30.42 days. Don’t use a calculator, or any web site that reports the number of seconds in a month, etc. – your C program can calculate anything that you need. Notice that this is an assignment on using arithmetic in C. Hints. How many seconds are in a minute? hour? A day? A week? A month? A year?
- Write a program thatreads in investment amount, annual interest rate, and number of years and displaysthe future investment value using the following formula:futureInvestmentValue =investmentAmount X (1 + monthlyInterestRate)numberOfYears*12For example, if you enter amount 1000, annual interest rate 3.25%, and numberof years 1, the future investment value is 1032.98.Here is a sample run: Enter investment amount: 1000.56 ↵EnterEnter annual interest rate in percentage: 4.25↵EnterEnter number of years: 1 ↵EnterFuture value is $1043.921. Federal law requires that hourly employees be paid “time-and-a-half” for work in excess of 40 hours in a week.For example, if a person’s hourly wage is $12 and he or she works 60 hours in a week, the person’s gross pay shouldbe (40 *12) + (1.5 *12 * (60-40)) = $840.Write a program that requests the floating number of hours a person works in a given week and the person’s hourlywage as input, and then displays the person’s gross pay. Save it as overtimePay.pyWrite a program that invites the user to enter two numbers: a dividend (the top number in a division) and a divisor (the bottom number). It then calculates quotient and remainder using / and % operator and displays the result. After one iteration it asks user whether he/she wants to do more (Y/N). (C++ show input and output as well)
- . Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers to remember. On a standard telephone, the alphabetic letters are mapped to numbers in the following fashion: A, B and C = 2 D, E and F = 3 G, H and I = 4 J, K and L = 5 M, N and O = 6 P, Q, R and S = 7 T, U and V = 8 W, X, Y and Z = 9 Write a program that asks the user to enter a 10-character number in the format XXX-XXX-XXXX. The application should display the telephone number with any alphabetic characters that appeared in the original translated to their numeric equivalent. For example, if the user enters 555-GET-FOOD, the application should display 555-438-3663. After displaying the translated telephone number, ask the user if they’d like to enter another number. If the user enters “y”, run the program again. If not, terminate the program. (10 points)Note: the sentence the program reads SHOULD NOT be hardcoded. Allow the user to enter the sentence the program reads PYTHONWhen Jacob Steinberg began his trip from California to Vermont, he filled his car’s tank with gas and reset its trip meter to 0. After traveling 324 miles, Jacob stopped at a gas station to refuel; the gas tank required 17 gallons. Jacob wants a program that calculates and displays his car’s gas mileage at any time during the trip. The gas mileage is the number of miles his car can be driven per gallon of gas. Desk-check your solution’s algorithm using 324 as the number of miles driven and 17 as the number of gallons used; then desk-check it using 280 and 15.Suppose you have a certain amount of money in a savings account that earns compound monthly interest, and you want to calculate the amount that you will have after a specific number of months. The formula is as follows: f = p * (1 + i)^t • f is the future value of the account after the specified time period. • p is the present value of the account (the account's current balance). • i is the monthly interest rate. • t is the number of months. Write a program that takes the account's present value (current balance), monthly interest rate, and the number of months that the money will be left in the account as three inputs from the user. The program should pass these values to a function that returns the future value of the account, after the specified number of months. The program should print the account's future value. Look carefully at the following sample run of the program. In particular, notice the wording of the messages and the placement of…
- Suppose that the first number of a sequence is x, where x is a non-zero positive integer. We define the following sequence: a0 = x, an+1 = an/2 if an is even, and an+1 = 3 ∗ an + 1 if an is odd. In such a sequence, there exists an integer k such that ak = 1. Write a program sequence.cc that prompts the user to enter the value of x, the program outputs the integer k such that ak = 1, the numbers a0, a1, a2, . . . , ak, the largest number of the sequence a0, a1, a2, . . . , ak, and the position of the largest number in the sequence. For example, if x = 75, then k = 14, the numbers a0, a1, a2, . . . , a14, respectively, are 75, 226, 113, 340, 170, 85, 256, 128, 64, 32, 16, 8, 4, 2, 1, the largest is 340, at position 3. Your program should prompt the user to run it repeatedly until she/he wants to quite. Please use break and continue statements. And loop and while statement! Thank you!Suppose that the first number of a sequence is x, where x is a non-zero positive integer. We define the following sequence: a0 = x, an+1 = an/2 if an is even, and an+1 = 3 ∗ an + 1 if an is odd. In such a sequence, there exists an integer k such that ak = 1. Write a program sequence.cc that prompts the user to enter the value of x, the program outputs the integer k such that ak = 1, the numbers a0, a1, a2, . . . , ak, the largest number of the sequence a0, a1, a2, . . . , ak, and the position of the largest number in the sequence. For example, if x = 75, then k = 14, the numbers a0, a1, a2, . . . , a14, respectively, are 75, 226, 113, 340, 170, 85, 256, 128, 64, 32, 16, 8, 4, 2, 1, the largest is 340, at position 3. Your program should prompt the user to run it repeatedly until she/he wants to quite. Please use break and continue statements. And loop and while statement! make sure k is identified in the output and don't use arrays for the program. thank you very much!!In a retail store, they offer an anniversary sale for their specially designed T-shirts (A, B, and C). For every Php 1000 total purchases, you will get a 5% discount on Shirt A. Assume that the prices for Shirts A, B, and C are Php50, Php75, and Php100, respectively. Write a program (using python) (with algorithm) that will accept the number of T-shirts purchase (or quantity) for each kind and will display the total purchases, discounted amount, and the amount to be paid (i.e. total purchase – discount). Sample Program Output 1 (with 5% discount): Sample Program Output 2 (with 2 x 5% discount):