Email 1
Subject: Awk Utility Assessment 1
File: awk-utility-assessment-1.awk
Create awk commands to remove all occurrences of the word "PCC"
from the input
stream. Your output should be a copy of each input line, with the
word PCC
removed wherever it occurs.
Email 2
Subject: Awk Utility Assessment 2
File: awk-utility-assessment-2.awk
Create awk commands to remove the first and last words from each
line of the
input (assume all lines contain 3 or more words). Your output
should be a
copy of each input line, with the first and last words removed.
Email 3
Subject: Awk Utility Assessment 3
File: awk-utility-assessment-3.awk
Create awk commands to count the number of digits in the
input.
Your output should be a single number.
Email 4
Subject: Awk Utility Assessment 4
File: awk-utility-assessment-4.awk
Create awk commands to calculate the sum of all digits in the
input.
For example, if the input contains the number 123 in the first
line,
and the number 456 in the last line, the output should be 21.
Your output should be a single number.
In: Computer Science
In C Programming Language
Write a program to output to a text log file a new line starting with day time date followed by the message "SUCCESSFUL".
Please screenshot the results.
In: Computer Science
Use DevC++ to implement a program that can store and output 5 integers, where the user can input its value into an array named arrayValue. The program should implement the following:
1. Calculate the sum and average of the array.
2. Output the content (value) that stored in the array of five elements.
3. Continue to ask the user to store for storing data into another array.
c++ ONLY PLEASE NEED IT FAST AS POSSIBLE
In: Computer Science
Write a program named FinalExamProgram2 that reads numbers from a file (which you will create using Notepad) into a one-dimensional array and then analyzes the numbers as described below. Your program must use loops to read the numbers into the array and to analyze the contents of the array. The program’s main function should do the following: Read eight floating-point numbers from the file named numbers.txt into a onedimensional array, displaying each number on the screen. Pass the array to a function that finds and displays (on the screen) how many of the array’s elements are zero, how many are negative, and how many are positive. Display the number of zeroes first. Then display the other two counts in descending order. In other words, if there are more positives than negatives, display the number of positives before you display the number of negatives—and vice versa. Pass the array to another function that finds and displays (on the screen) the average of the squares of the positive numbers and the average of the squares of the negative numbers. Display these averages in descending order. Your outputs should look exactly as shown on the next page (spelling, punctuation, spacing, number format, and so on).
In: Computer Science
Write a program to prompt the user to display the following menu:
Guess-Number Concat-names Quit
Guess a number: 76
96:
Too large
10
Too small
70
Close
Do you want to quit? Q
How many names: 3
First name last name Combined
Sue Smith Sue Smith
Alan Davidson Alan Davidson
David Lee David Lee
Do you want to quit? Q
C++
In: Computer Science
Question 15: Use the Master theorem to find the asymptotic complexity of the running time function T(n) of the program in problem 14.
--- Problem 14 ---
def prob14(L):
if len(L) <= 1:
return 0
output = 0
for x in L:
for y in L:
output += x*y
for x in L:
output += x
left = L[ 0 : len(L)//2 ]
right = L[ len(L)//2 : len(L) ]
return output + prob15(left) + prob15(right)
***Big-O, Omega, Theta complexity of functions, Running time equations of iterative functions & recursive functions, Substitution method & Master theorem
Please answer within these topics.***
In: Computer Science
Use DevC++ to implement a program uses objected oriented programming to calculate the area of a rectangle. The program should create a Rectangle class that has the following attributes and member functions:
Attributes:
width and length
Member functions:
setWidth(), setLength(), getWidth() , getLength(), getArea()
Where width and length are the respect width and length of a Rectangle class. The setWidth() and setLength() member function should set the length and width, the getWidth(), getLenght(), and getArea() member function should get the length, width, and area. The program should
1. Ask the user for the length and width of rectangle.
2. Output the length, width, and area of a rectangle.
3. Continue to ask the user to calculate another rectangle area by asking length and width.
C++ ONLY
In: Computer Science
Tag |
Index |
Offset |
31 - 8 |
7 - 4 |
3 - 0 |
Starting from power on, the following byte-addressed cache references are recorded.
Address |
|||||||||||
0 |
4 |
14 |
132 |
232 |
160 |
1024 |
30 |
140 |
3100 |
180 |
2180 |
In: Computer Science
2. What are the three program control structures? Define each thoroughly and give an example of each.
3. Explain in detail the difference between a Class Variable and an Instance Variable. How do we declare a Class Variable?
4. Which of the following is true?
a. Java programs can run on different platforms, like
Windows and Unix, without being recompiled.
b. C++ programs have always run more slowly than Java
programs.
c. In contrast to Java, C# requires programmers to
manage almost all memory operations.
d. All of the above.
In: Computer Science
Design and implement a C++ program
Sample program execution:
An example of executing such a program is shown below. Note that the user input is in italic font.
Please enter a line of characters: This is a really long line of characters! There are 41 characters in the input line. And among them, 33 are letters. letter number frequency A 4 0.121212 B 0 0 C 2 0.0606061 D 0 0 E 3 0.0909091 F 1 0.030303 G 1 0.030303 H 2 0.0606061 I 3 0.0909091 J 0 0 K 0 0 L 4 0.121212 M 0 0 N 2 0.0606061 O 2 0.0606061 P 0 0 Q 0 0 R 3 0.0909091 S 3 0.0909091 T 2 0.0606061 U 0 0 V 0 0 W 0 0 X 0 0 Y 1 0.030303 Z 0 0
In: Computer Science
Unit 8
5. Differentiate between tech sector, STEM, and computer industry careers.
In: Computer Science
In C# A Tic Tac Toe program that uses functions and arrays. The program should start by asking the player one for their name and then player two for their name. Then should print the board and ask the user what column and then what row they would like to put their x (or o, depending on the player) . Use the clear function to make it look as though the board is never repeating.. Thanks!
In: Computer Science
In: Computer Science
What are the 5 defined steps in the Data Mining process to gain knowledge?
PLEASE EXPLAIN IN DETAIL
In: Computer Science
Unit 8
10. Explain the ethical dilemma faced by whistleblowing.
In: Computer Science