• write a program that reads two integer values from the user and then prints the Greatest Common Factor (if exits). The Greatest Common Factor is the largest integer that both integers are divisible by. (1 is excluded from the definition). Example: if a=35 and b=150 then the Greatest Common Factor (GCF) for them is 5 because 5 is the largest integer that both 35 and 150 are divisible by (without any remainder).
Q: The Output of below program vari = "Hello"; console.log(vari); var vari; (a) Compilation Error (b) H...
A: put Hello in vari vari is variable console.log print the statement inside it print Hello that is i...
Q: In what year was the ENIAC first developed?
A: Answer : 1946
Q: What is the origin of the Colossus machine?
A: Colossus was a set of computers developed by British codebreakers in the years 1943-1945 to assist i...
Q: Von Neumann's architecture has what characteristics?
A: Here in this question we have asked about the characteristics of Von Neumann's architecture .
Q: Big data has become a part of every organization's information technology systems in today's world. ...
A: I have answered this question in step 2.
Q: 2. Write a JAVA program to find the sum of all elements greater than 50 in the array given belo int ...
A: code
Q: 10). In interrupts the starting address is fixed. A. External interrupt B. Vectored interrupts C. No...
A: Correct answer is B) Vector Interrupts
Q: 12 12. Perform Gauss-Jordan elimination on the augmented matrix shou [10 2 A.O 1 7 00 1 [1 0 0 B.O 1...
A: Lets see the solution in the next steps
Q: IDENTIFY ATLEAST 3 PROS AND CONS OF THE PC BUILD. THE PC IS BUILD FOR BASIC WORD PROCESSING TASKS.
A: IDENTIFY AT LEAST 3 PROS AND CONS OF THE PC BUILD. THE PC IS BUILD FOR BASIC WORD PROCESSING TASKS.
Q: NOTE: SHOW THE OUTPUT OF THE CODE YOU'LL GIVE (so I can know if it's correct) IN PYTHON: In the co...
A: IN PYTHON: In the code template below, you are given three classes: Card, CardSet, and Deck. The Car...
Q: Consider the usual algorithm to convert an infix expression to a postfix expression. Suppose that yo...
A: Stack for the case where the 11th symbol is :
Q: Is there a difference between storage architecture and data storage architecture?
A: Introduction: Storage: Devices for storing data or information are known as storage devices in infor...
Q: Solve the following recursive function for count_partitions(6 , 4). Also draw the Recursion tree. ...
A: Step 1: Number of ways to partition n up to m=number of ways to partition n-m up to m + number of wa...
Q: What is the name of Thomas Watson Jr.'s father?
A: Thomas John Watson Jr. Thomas John Watson Jr. (January 14, 1914 – December 31, 1993) was an American...
Q: 0) For the pattern P = "0001" and the text T = "000010001010001" simulate the Rabin Karp algorithm w...
A: Introduction: The Rabin Karp algorithm is a string matching technique that uses a hash function to l...
Q: EREW PRAM algorithm to find an item in an array of length n in O(log n) time
A: Step 1 Below discussed:
Q: 10). In interrupts the starting address is fixed. A. External interrupt B. Vectored interrupts C. No...
A: Answer: B. Vectored Interrupts Check the step 2 for detailed explanation
Q: Is there a known inventor of the microprocessor?
A: A microprocessor is a CPU with multiple integrated circuits that contain the logic, control, and ari...
Q: Who was the inventor of the world's first digital computer?
A: Digital computer: Digital computer is the one of the machine. Digital computer is the most commonly ...
Q: QUESTION 3 Fill in the following three blank spaces with the code necessary to allocate 20 floats in...
A: These is called as the dynamic memory allocation. Programming languages like c allows user to grab t...
Q: a) Compare and contrast the following pairs of software lifecycle models, giving particular attentio...
A: What Is Software Life Cycle Model? In the software business, the Software Development Life Cycle (SD...
Q: How do computers save information?
A: Computerized Information: Data are units of information in computer science. These data may be saved...
Q: S%3Dab.(b+ d) + aс
A: - We need to have a circuit for the equation provided.
Q: Select the best answer for the question -4 2 1 7 12. Perform Gauss-Jordan elimination on the augment...
A: This question comes from Number Theory which is a paper of Computer Science. Let's discuss it in the...
Q: Write an essay consisting of 150 words based on your reaction on the IC-related growth in the Philip...
A: I have answered this question in step 2.
Q: Apply Image Segmentation clustering to cluster the following data points with value of K=3 and Initi...
A: Euclidean Distance formula is : d(p,q)=d(q,p)= (q1-p1)2+(q3 - p3)2 +....+(qn-pn)2= ∑i=1n(qi-pi)2 ...
Q: Wooden Fence Recently, Vincent has just bought a farm. He plans to enjoy his retirement by raising h...
A: Program Explanation: 1) Implementing the Header file 2) Implementing the integer 3) Calculating the ...
Q: where n = 1G (i.e., 4 xn uniquely addressable locations-n: row, 4:2 column/width), what is the total...
A: The answer is
Q: Insert Delete Search Display Height Total number of nodes
A: Lets see the solution.
Q: , using JAVA (please provide full code wit
A: The RMI (Remote Method Invocation) is an API that provides a mechanism to create distributed applica...
Q: 3 per minute and each is expected to use the software for 20 minutes (1 student stops using the lice...
A: The answer is
Q: What do you mean by iop? Explain the concept of cpu-iop communication with the help of its flow char...
A: Let's understand step by step : Input -Output Processor (IOP) : IOP is mainly used to reduce the b...
Q: Write no more than two lines of code to read in a primary of integer from the keyboard and store it ...
A: float and int are 32-digit wide information types, the float has a higher reach than the whole numbe...
Q: Assume, r1= 0×A2FF0010, r2 = 0X5D00FFF0
A: The answer is
Q: Create a c++ langauge that ask the user to enter a name (one word only) and then print the name in t...
A: Code: #include <iostream>#include <bits/stdc++.h>using namespace std; int main(){ str...
Q: The following is a system requirement for an inventory subsystem. The warehouse staff receives the p...
A: solution:
Q: 14. Use Gauss-Jordan elimination to solve the following linear system: -3x +4y = -6 5x- у - 10 Ο Α.(...
A: Here in this question we have given some linear equations and with using gauss jordan elimination m...
Q: Class CPI % of instructions 1 20% 50% C 30% 3. A B.
A: The answer is
Q: Consider a computer with the following characteristics: total of 4 Mbyte of main memory; word size o...
A: It is given that- Main memory size = 1 MB. Word size = 1 Byte. Block size = 16 bytes Cache size = 64...
Q: we aorogamut ge a uer rovt number and pnnts the sumof eas dy n me numeer for eamgin, aver on L, Pen ...
A: Find Your Code Below
Q: 'Rabenstein code was used to send a message with 4 information bits, you receive 100110001,
A: The answer is
Q: format has micro operation field which is divided into 2 subfields F1 and F2, each having 15 distinc...
A: INTRODUCTION: The microprocessor instruction format is split into three subfields, F1, F2 each of wh...
Q: 5: Compare output a Output differs. See highlights below. 54 6.02 Input m Bye Enter integer: Enter d...
A: Explanation :- Here is your problem with code at ( FixMe (3): ) The userDouble doesn’t show in your ...
Q: b) For the following C statement, write the corresponding LEGV8 assembly code. Assume that the varia...
A: (b) For the following C statement, write the corresponding LEGv8 assembly code. Assume that the vari...
Q: In computer memory, how do local declarations get put in place? Yes, but there aren't any good reaso...
A: Introduction: Memory Allocation: The technique by which the software creates "space" for informatio...
Q: Calculate the execution time of the following code : ( Note: you may use ^ for power, e.g., x cube a...
A: Let's understand step by step : Given code is : i=1; sum=0; while(i<=n) { j=1; while(j<=n)...
Q: When it comes to infrastructure and architecture, what is the difference
A: InfrastructureInformation technology infrastructure is a broad term that refers to a collection of i...
Q: In 1977, which business released the first home computer?
A: In 1977, first personal computers were introduced as mentioned below,
Q: Is it known what Alan Turing's intelligence quotient was?
A: Answer : 185 intelligence quotient
Q: When was the first flash drive created?
A: Here, I have to explain when the flash drive was created.
Computer Science
Step by step
Solved in 4 steps with 2 images
- Question 3 Write a program that finds the equivalent series and parallel resistance for a collection of resistor values. Your program should first read in the number of resistors and then compute the equivalent series resistance for all resistors in the collection and the equivalent parallel resistance. For example, if there are 3 resistors of 100, 200, and 300 Ohms, respectively, their equivalent series resistance is 100+200+300 and their equivalent parallel resistance is 1(1/100+1/200+1/300). Your program should read each resistance value (R), add R to the series sum (RS) and add 1/R to the parallel sum (RP). After loop exit, display RS and 1/RP.computer science | c++ code | it's not graded. Correct answer will upvoted else downvoted. It is given a non-negative integer x, the decimal portrayal of which contains n digits. You need to shading every its digit in red or dark, so the number shaped by the red digits is separable by A, and the number framed by the dark digits is detachable by B. No less than one digit should be shaded in every one of two tones. Consider, the include of digits hued in red is r and the include of digits hued in dark is b. Among all potential colorings of the given number x, you need to output any to such an extent that the worth of |r−b| is the base conceivable. Note that the number x and the numbers shaped by digits of each tone, may contain driving zeros. Input :The principal line contains one integer t (1≤t≤10) — the number of experiments. Then, at that point, t experiments follow. Each experiment comprises of two lines. The main line contains three integers n, A, B (2≤n≤40, 1≤A,B≤40).…Interest on a credit card’s unpaid balance is calculated using the averagedaily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is:averageDailyBalance = (netBalance * d1 – payment * d2) / d1If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is:interest = averageDailyBalance * 0.0152Write a program that accepts as input netBalance, payment, d1, d2, and interest rate per month. The program outputs the interest. Format your output to two decimal places.
- Let A = {a, b, c} and B = {u, v}. Write a. A × B b. B × AInterest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance = (netBalance * d1 - payment * d2) / d1. The interest on the unpaid balance is: interest = averageDailyBalance * interestRate where interestRate is the interest rate per month. Write a program that accepts as input netBalance, payment, d1, d2, and interestRate. The program outputs the interest. Format your output to two decimal places. Analyze and design this program. Write the code, compile and run it. Upload your analysis and design document and your .cpp source code file here.Please code in C++. Write a program that simulates a coin-tossing game. At the beginning of the game, each of N players has a single fair coin and M points. The game performs a sequence of passes until only a minimum number of players remain. In a pass the players toss their coins into the air and when the coins fall to earth, the players count the number of coins that show heads and the number of coins that show tails. If the number of heads exceed the number of tails, then the players who tossed heads increase their points by an integer P and the players who tossed tails decrease their points by the same integer P. The players perform the opposite actions when the number of tails is greater than the number of heads. If the number of heads equals the number of tails, then no player’s points change. If any player’s points fall below one, then the player leaves the game, never to return. The game employs a second integer K to compute P’s value. K’s and P’s initial values are one.…
- Three numbersa. Write a program that reads three numbers and prints “all the same” if they are allthe same, “all different” if they are all different, and “neither” otherwise.b. Write a program that reads three numbers and prints “increasing” if they are inincreasing order, “decreasing” if they are in decreasing order, and “neither”otherwise. Here, “increasing” means “strictly increasing”, with each value largerthan its predecessor. The sequence 3 4 4 would not be considered increasing.c. Repeat part b. but before reading the numbers, ask the user whetherincreasing/decreasing should be “strict” or “lenient”. In lenient mode, thesequence 3 4 4 is increasing and the sequence 4 4 4 is both increasing anddecreasingQ3: Interplanetary Spaceflight Milan Tusk is the richest person in the universe. After devoting decades of his life to further our space exploration technologies, he’s finally ready to retire. Being a space enthusiast, the first thing he wants to do is visit n planets p1, p2, …, pn, in this order. He’s currently on planet p0. Milan knows that the distance between planets pi and pi + 1 (for 0 ≤ i < n) is d[i]light years. His spaceship uses 1 tonne of fossil fuels per light year. He starts with a full tank and can fill up his tank at any of the n planets (but he must not run out in between two planets). There’s a huge cost to set up the spaceship for refuelling. Due to financial constraints (he’s not THAT rich), he can fill up his tank at most ktimes. In order to save money and make his spaceship lighter, Milan is looking for the smallest possible fuel tank that enables him to complete his space travel and reach planet pn. What is the smallest tank capacity that enables him to do so?…le.com/forms/d/e/1FAlpQLSc6PlhZGOLJ4LOHo5cCGEf9HDChfQ-tT1bES-BKgkKu44eEnw/formResponse The following iterative sequence is defined for the set of positive integers: Sn/2 3n +1 ifn is odd if n is even Un = Using the rule above and starting with 13, we generate the following sequence: 13 u13 = 40 u40 =20 u20 = 10→ u10 =5 u5 = 16 u16 = 8 ug = 4 → Us =2 u2 =1. It can be seen that this sequence (starting at 13 and finishing at 1) contains 10 terms. The below function takes as input an integer n and returns the number of terms generated by the sequence starting at n. function i-Seq (n) u=n; i=%3; while u =1 if statement 1 u=u/2; else statement 2 end i=i+1; end statement 1 and statement 2 should be replaced by: None of the choices statement 1 is "mod(u,2)=D%3D0" and statement 2 is "u = 3*u+1;" statement 1 is "u%2" and statement 2 is "u = 3*u+1;" O statement 1 is "mod(n,2)=30" and statement 2 is "u = 3*n+1;"
- [Fish Tank] You play with a clown fish that has an initial size so. The fish can eat other fish in a tank organized in m columns and n rows. The fish at column i and row j has a positive size si,j. When your fish eats another fish, it grows by that amount. For example, if your clown fish has a size of 10 and eats a fish of size 5, it becomes of size 15. You cannot eat a fish that is bigger than your size. The game starts by eating any fish in the first (left-most) column that is not bigger than yours. After that, you advance one column at a time by moving right. You have only three allowed moves. You either stay at the same row, move one row higher or one row lower. You will always move to the right. Thus, you will make exactly m moves to advance from left to right. Your goal is to exit the fish tank from the right with the biggest possible size. The figure below shows an example with the best answer highlighted. In this case, the final fish size is 71 (10+8+7+24+22). You are required…Assume that a, b, c are numbers.Return 'increasing' if they are in increasing order, 'decreasing' if they are in decreasing order, 'both' if they are both increasing and decreasing, and 'neither' otherwise.Here, 'increasing' means that each value is at least as largeas its predecessor. Similarly for decreasing.The sequence 3, 4, 4 is increasing. whereasthe sequence 4, 4, 4 is both increasing and decreasing.For example,lenient(3, 4, 5) returns 'increasing'lenient(3, 4, 4) returns 'increasing'lenient(4, 4, 4) returns 'both'lenient(4, 3, 2) returns 'decreasing'lenient(4, 3, 3) returns 'decreasing'lenient(4, 2, 3) returns 'neither'In C++ write a program that generates three random numbers and then find the min number among the generated values, using these three functions: void getrandnum(int &n1, int &n2, int &n3), int findMin(int n1, int n2, int n3), and void printResult(int n1, int n2, int n3, int min). Make the main function drive all these functions.