1. Generalized harmonic numbers. Write a program GeneralizedHarmonic.java that takes two integer command-line arguments n and r and uses a for loop to compute the nh generalized harmonic number of order r, which is defined by the following formula:
Q: What are the five most essential do's and don'ts of email, and how do you explain them and offer…
A: Introduction: During the early 1990s, when email became extensively utilized, the business sector…
Q: Will in-house systems analysts become obsolete as more organizations outsource system development?…
A: Outsourcing is the process of leveraging the services of external suppliers to fulfill services and…
Q: When developing subtype associations, talk about the database table options. Discuss the factors…
A: NOTE: We are only authorized to answer a single question at a time; therefore, please submit this if…
Q: What changes would certification programs need to make in the future to best fulfill the IT…
A: Aspects of certification programs that provide advantages You will have a competitive edge when…
Q: What are the differences between logical and physical addresses?
A: Introduction: Physical address is a permanent hardware level address embedded in a network interface…
Q: What are some of the advantages of cloud computing? What are the dangers and issues associated with…
A: The following are some of the advantages of cloud computing: 1. Lower IT expenses. 2. The capacity…
Q: There are n identically looking coins one of which is fake. There is a balance scale, but there are…
A: Since, its given that :- n identically looking coins one of which is fake coin and is heavier than…
Q: 5 examples of Type I erro
A: What is a Type I Error? In statistical hypothesis testing, a Type I error is essentially the…
Q: Will in-house systems analysts become obsolete as more organizations outsource system development?…
A: Justification: Outsourcing is the process of using outside vendors to provide services and duties…
Q: What is the effect of this connection on database design?
A: A database is a collection of tables, each containing a specified number of records.When we have…
Q: What are the drawbacks of allowing everyone to access the security infrastructure?
A: Given: With all of the talk about cloud adoption, it's easy to think that on-premises IT…
Q: Sarah is short than her sister * true False Ali is good at basketball than Tiny true False Cheetahs…
A: As per our policy we can only solve first three questions . Please post other questions separately…
Q: In your opinion, what is the FSF?
A: Given: FSF stands for Free Software Foundation. It is a non profit organization created by Richard…
Q: To what extent do the four distinct Nmap scanning modes interact with the three-way handshake when…
A: N map scanning modes: N map is a network discovery and security auditing tool. It is noted for its…
Q: If the time it takes to change the context is a function of interrupt latency, what does it mean…
A: Given: The time it takes for a system interrupt to be handled from the moment it is generated to the…
Q: Consider the advantages and disadvantages of employing wireless solutions. Provide at least two…
A: The advantages and disadvantages of employing wireless solutions. :--->> Media that is…
Q: When it comes to protecting data in transit and at rest, what activities do you think are most…
A: Introduction: Encryption is necessary for data security while it is in use or in transit. When…
Q: Please design an algorithm to detect the fake coin
A: => Fake coin problem, we have N number of coins all of equal weight, out of them, one is fake and…
Q: a. PRODUCER CONSUMER PROBLEM USING SEMAPHORES Start the Program Declare the required variables…
A: Start the Program Declare the required variables Initialize the buffer size and get maximum item you…
Q: Which of the following is a common wired network technology? a. Ethernet b. Wi-Fi c. Bluetooth d.…
A: Note: As per our guidelines we are supposed to answer only one question. Kindly repost other…
Q: "Beware of sites that contain bias or do not admit its bias freely" is related to which of the…
A: c. Objectivity
Q: What are the different layers of abstraction in TCP/four IP?
A: ANSWER:-
Q: could you DRAW A SIMPLE CIRCUIT DIAGRAM of a functional 5461as 8-segment display (arduino kit) with…
A: It is defined as a 16 Pin SIPO IC. SIPO stands for Serial In and Parallel Out which means that it…
Q: Why are memory related with two separate registers (MAR and MDR)? b) In the Little Man Computer,…
A: THERE ARE TWO TYPES OF REGISTRATION: MEMORY IS ASSOCIATED WITH MAR AND MDR FOR THE REASON THAT…
Q: Give four page replacement algorithms a name and a description. Compare and contrast them?
A: Components of Technology: The technical component is a portion of a procedure or service payment…
Q: create a Windows application using Visual Studio then create a simple word-guessing game using…
A: Using C# Language Create a simple word-guessing game using ArrayList and StringBuilder.
Q: Can the foreign key be extracted from another table that is not connected to it in entity…
A: Foreign keys are a part of table which are being sourced from some column in a different table.
Q: In a computer and IT environment, are there any contrasts from more conventional media that does not…
A: The qualities that characterize computer and information technology settings are as follows:…
Q: Please create a python function that uses a stack implementation that can turn the input list QWERTY…
A: A stack is a linear data structure which follows First In Last Out principle. This means the element…
Q: What measures do you think are essential to protect the security of data when it is at rest and…
A: DEFINITION Considered are data-at-rest and data-in-transit security measures: Implement network…
Q: When creating software system models, which perspectives should be used?
A: Software System Model: The practice of creating abstract models of a system, each of which presents…
Q: use of computers in the educational system grov
A: Computers are unbelievably powerful for a large number of reasons. They work dangerously fast, with…
Q: Matlab Create a structure that consist of four fields, {array, max, min, sum} - File in these fields…
A: Given: We have to write a matlab code to Create a structure that consist of four fields, {array,…
Q: When creating software system models, which perspectives should be used?
A:
Q: What are the four components of IEEE 802.11?
A: Given: IEEE 802.11 architecture is made up of four components. 1) Channels (STA) - All devices and…
Q: What makes Chrome OS computers utilize less internal storage than competing desktop operating…
A: Operating System (OS): OS is the term that acts as an interface between the hardware and the user.…
Q: You are in a coffee shop and use the Wi-Fi service to access your bank accounts. Someone sitting…
A: Computer Security Threats: Computer security concerns might jeopardies the smooth functioning and…
Q: No such port Your uncle has given you a new computer monitor. When you try to connect it, none of…
A: Answer Steps for resolving the issue The user needs to check the details for the port type that is…
Q: Do you know when an interruption will arrive? What does this have to do with context switching?
A:
Q: نقطة واحدة Which among the following best * ?defines single level inheritance A class inheriting a…
A: According to the question the inheritance in the which the single derived class is the inherited…
Q: complete the sentence with a preposition ( in, at , on) or (no preposition)
A: I phone you ________ minutes ago. Answer:- no preposition What did you do _______ last night.…
Q: discusses the differences between two distinct control structures - and how these differences can…
A: Encryption: Control Structures are the squares that assess variables and choose bearings based on…
Q: Consider the advantages and disadvantages of employing wireless solutions. Provide at least two…
A: Introduction: This is a high-speed option for sharing information over short periods of time or for…
Q: Exercise 3: Building a Point of Sales (POS) using a linked list data structure. In a POS system, a…
A: Possible solutions include: Creating a linked list data structure for a point of sale (POS):…
Q: I dont have .. Friends much many a litte All she wanted was Moments on her own a few a little many I…
A: To fill in the sentences so as it correct and meaningful.
Q: When comparing Computer Science and Computer Engineering, what is the difference between them?
A: There are various version regarding the engineering related to Software development.
Q: In your view, is it a good idea to use the cloud? Why?
A:
Q: Write a program for Histogram Equalization of an image without using the built-in function histeq.
A: Answer
Q: Describe basic C input/output functions. Name and describe standard input and output devices.
A: Answer Basic input and output in C: C language contains standard libraries which allow input and…
Q: Encrypt the following message by Caesar’s cipher: “You are welcome” a. Brx duh zhofrph b. brx…
A: Answer: The encryption can be represented using modular arithmetic by first transforming the letters…
My code keeps giving me an answer of 1. If i set the values manually it gives a correct answer so the math portion is correct but when i add a command line it always gives value of 1 please help
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- java: Run length coding is a method to represent a string in a more compact manner. Each character that occurs more than 2 times in a row is represented by the character and a number following it. Two examples are: "abba" → "abba""abcccbbbba" → "abc3b4a"Write a function that calculates how many characters the encoded string is shorter than the original.1. Divisors: In a class Divisors.java, read in a maximum integer n and use nested loops to print a list of divisors for each of 1 through n as shown in the following transcript. Sample transcript (input underlined): Largest integer? 100 1: 1 2: 1 2 3: 1 3 4: 1 2 4 95: 1 5 19 95 96: 1 2 3 4 6 8 12 16 24 32 48 96 97: 1 97 98: 1 2 7 14 49 98 99: 1 3 9 11 33 99 100: 1 2 4 5 10 20 25 50 100Oct 13 8:38 A
- A spell checker in a word processing program makes suggestions when it finds a word not in the dictionary. To determine what words to suggest, it tries to find similar words. One measure of word similarity is the Levenshtein distance, which measures the number of substitutions, additions, or deletions that are required to change one word into another. For example, the words spit and spot are a distance of 1 apart; changing spit to spot requires one substitution (i for o). Likewise, spit is distance 1 from pit since the change requires one deletion (the s). The word spite is also distance 1 from spit since it requires one addition (the e). The word soot is distance 2 from spit since two substitutions would be required. a. Create a graph using words as vertices, and edges connecting words with a Levenshtein distance of 1. Use the misspelled word “moke” as the center, and try to find at least 10 connected dictionary words. How might a spell checker use this graph? b. Improve the method…In C++ Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will read a list of one word names (until -1), and use a recursive method to create and output all possible orderings of those names, one ordering per line. When the input is: Julia Lucas Mia -1 hen the output is (must match the below ordering): Julia Lucas Mia Julia Mia Lucas Lucas Julia Mia Lucas Mia Julia Mia Julia Lucas Mia Lucas Julia #include <vector>#include <string>#include <iostream> using namespace std; // TODO: Write method to create and output all permutations of the list of names.void AllPermutations(const vector<string> &permList, const vector<string> &nameList) { } int main(int argc, char* argv[]) { vector<string> nameList; vector<string> permList; string name; // TODO: Read in a list of names; stop when -1 is read. Then call recursive method. return 0;}1. Generalized harmonic numbers. Write a program GeneralizedHarmonic.java that takes two integer command-line arguments n and r and uses a for loop to compute the nth generalized harmonic number of order r, which is defined by the following formula: 1 1 +...+ 1 H(n,r) = +7 1" 1 1 1 For example, H(3,2) = 12 49 = 1.361111. 36 %3D 22 32 -/Desktop/loops> java GeneralizedHarmonic 1 1 1.0 -/Desktop/loops> java GeneralizedHarmonic 2 1 1.5 -/Desktop/loops> java GeneralizedHarmonic 3 1 1.8333333333333333 ~/Desktop/loops> java GeneralizedHarmonic 1 2 1.0 -/Desktop/loops> java GeneralizedHarmonic 2 2 1.25 ~/Desktop/loops> java GeneralizedHarmonic 3 2 1.3611111111111112 Note: you may assume that n is a positive integer. The generalized harmonic numbers are closely related to the Riemann zeta function, which plays a central role in number theory.
- void deleteRange( int from, int to) {int i, j = 0;for (i = 0; i < counter; i++) {if (i <= from - 1 || i >= to + 1) {A[j] = A[i];j++;}}for (int i = 0; i < j; i++)cout << A[i] << " ";} Above method deletes range of elements from an array. Consider array A[] globally declared and counter is its size. Please explain the logic of above code in simple english (algorithm and comments).java Write a recursive method largestDigitthat accepts an integer parameter and returns the largest digit value that appears in that integer. Your method should work for both positive and negative numbers. If a number contains only a single digit, that digit's value is by definition the largest. The following table shows several example calls: Call Value Returned largestDigit(14263203) 6 largestDigit(845) 8 largestDigit(52649) 9 largestDigit(3) 3 largestDigit(0) 0 largestDigit(-573026) 7 largestDigit(-2) 2 Obey the following restrictions in your solution: You may not use a String, Scanner, array, or any data structure (list, stack, map, etc.). Your method must be recursive and not use any loops (for, while, etc.). Your solution should run in no worse than O(N) time, where N is the number of digits in the number.CodeW For fun X C Solved https://codeworkou... 臺亂 CodeWorkout X272: Recursion Programming Exercise: Is Reverse For function isReverse, write the two missing base case conditions. Given two strings, this function returns true if the two strings are identical, but are in reverse order. Otherwise it returns false. For example, if the inputs are "tac" and "cat", then the function should return true. Examples: isReverse("tac", "cat") -> true Your Answer: 1 public boolean isReverse(String s1, String s2) { 2. if > 3. 4. else if > return true; return false; 5. 6. else { String s1first = String s2last return s1first.equals (s2last) && 51. substring(0, 1); s2, substring(s2.length() 1); 7. 8. 6. isReverse(s1.substring(1), s2.substring(0, s2.length() 1)); { 12} 1:11AM 50°F Clear 12/4/2021
- inhinclude Rsing namespace std; int maxResult( ) int maxVal for (int i { for (int j = 0; j <= n 0; i <= n; i += a) i; j += b) %3D %3D float z = (float)(n (i + j)) / (float)(c); if (floor(z) { int x = int y ceil(z)) i / a; j/ b; maxVal = max(maxVal, x + y (int)z); return maxVal; } int main() { max cout << maxResult( ); return 0; 1 } Input Compilation failed due to fellowing ons main.cpp:7:23: error: 'n' was not declared in this scope 7| for (int i = 0; i <= n; i a) main.cpp:7:31: error: 'a was not declared in this scope for (int i = 0; i <= n; i t= a) %3D main.cpp:9:36: error: b' was not declared in this scope | 6 for (int j = 0; j <= n - i; j - b) %3D main.cpp:11:45: error: 'c was not declared in this scopeIn Python, The function concatAltChars takes a string parameter s and a boolean parameter even; the function concatenates together either the even-position characters of s or the odd-position characters of s, depending on whether even is True, or False, respectively. The accumulated string is returned. For example, the even-indexed characters of "HANOVER" are at indexes 0, 2, 4, and 6: H N V R. So, concatAltChars("HANOVER", True) returns the string result "HNVR". But concatAltChars("HANOVER", False) returns the string result "AOE". For example: Test Result s = "goldfinches" print(concatAltChars(s, True)) glfnhs s = "A" print(concatAltChars(s, True)) A s = "A" print(concatAltChars(s, False))Write in C Language Spilitology Yosef is a peculiar fellow. He introduced the idea to study a string by splitting it into two, and he called it Splitology. Why split a string? We do not know. Didn’t we say that Yosef is a weird one? Yosef is interested in one particular type of string, a palindrome. A palindrome is a string that is the same for both forwards and backwards. Example of palindrome strings are “ada”, “taat”, and “radar”. On the other hand, string such as “taman” is not a palindrome; notice that “taman” becomes “namat” if read backwardsand it’s not the same as “taman”. As the idea of Splitology is still new, Yosef is investigating whether a string can be split into two non-empty strings such that each string is a palindrome. For example, the string “malamini” can be split into “malam” and “ini” while both of them are palindrome. Another example is “ababab”. It can be split into “aba” and “bab”, and both of them are palindrome. Note that “ababab” can also be split into…