Write a function that accepts an array of integer

Assignment Help Software Engineering
Reference no: EM13994787

Write a function that accepts an array of integer values and the number of values in this array. It should return true if any of the values in the array is the square of one of the other values, and false otherwise

example1:

the array contains { 4, 5, 9, -3, 25, 17 }

the function should return true (25 = 5 squared, 9 = -3 squared)

example2:

the array contains { 4, 5, 12, -3, 24, 17, 1 }

the function should return false (none of the values are the square of one of the other values)

Note the "other values". Having a "1" somewhere in the array does NOT guarantee a true result.

Your function must be consistent with the sample call below:

int values[20];

.....

if (checkForSquares (values, 20)) {

.... // one of the values is the square of one of the other values

}

Reference no: EM13994787

Questions Cloud

Find the equivalent capacitance between points a and b : Find the equivalent capacitance between points a and b for the group of capacitors connected as shown in the figure above. Take C1 = 4.00 μF, C2 = 14.0 μF, and C3 = 3.00 μF.
Software engineer working as a performance engineer : Prepare and submit a paper dealing with a topic from your current course that could be applied to your workplace. The paper should be a minimum of 750 words (about 3 double-spaced pages) and contain a minimum of two (2) outside references from peer-r..
What kind of claims are the economists making : Some economists think the government should help fund local sports stadiums while other economists think the government should leave the funding up to the private sector. a. What kind of claims are the economists making? b. What are two reasons the e..
Using a supply-and-demand graph : Using a supply-and-demand graph and assuming competitive markets, show and explain the effect on equilibrium price and quantity of the following: A technological change that reduces the cost of producing X-Rays on the market for physician clinic serv..
Write a function that accepts an array of integer : Write a function that accepts an array of integer values and the number of values in this array. It should return true if any of the values in the array is the square of one of the other values, and false otherwise
Prepare the liability section of a classified balance sheet : Prepare the liability section of a classified balance sheet and any necessary footnote disclosure for Nevada Harvester at December 31, 2011. Accounts payable and accruals are $22 million.
Assume that you are approaching the implementation : Assume that you are approaching the implementation and deployment phases of the online course management system that you worked on in previous assignments. Imagine that the client signed a long term contract that entitles the client to software and s..
Production possibilities curve between health and all goods : Draw a production possibilities curve between health and all other goods. Insert a point in the drawing that illustrates an economy with an inefficient health system. Insert two additional points that illustrate two efficient economies, but two that ..
Federal funds rate is higher than the target rate : What might the Fed do if the federal funds rate is higher than the target rate? How would it use its tools (required reserve ratio, discount rate, and open market operations) to achieve this target?

Reviews

Write a Review

 

Software Engineering Questions & Answers

  Consider the following program segment

Consider test cases  t 1 = ( n  = 3) and  t 2 = ( n  = 5). Although these tour the same prime paths in  printPrimes() , they do not necessarily find the same faults. Design a simple fault that  t 2 would be more likely to discover than  ..

  How can cia triad of security be applied to an organization

How can the CIA triad of security be applied to an organization and not just a single system and What are the key factors involved in assessing the importance of a risk

  Which of the following advanced architectures

Which of the following advanced architectures do you consider to be the most reliable? Why? No plagarism

  What are the rules regarding password strength

UI Modifications: What changes are users allowed to make to their Windows settings, and what changes are prohibited? If personal photos are allowed as desktop images, what are the guidelines for appropriate photos to use?

  Explain the software security touchpoint

Explain the software security Touchpoints. Describe the benefits of using the software security Touchpoints

  Planning and budgeting methods are notorious for their

question 1 planning and budgeting processes are notorious for their rigidity and irrelevance to management action. how

  Improving the new product development process

In this era of "faster, cheaper and better", companies are focusing on improving the product development process. New business strategies, new organizational approaches, new business processes and new enabling technology are being used by many upc..

  Explain why the testing of software products is important

Explain why the testing of software products is of great importance. Provide a graphical depiction of your solution through the use of Microsoft Visio or its open source alternative, Dia. Note: The graphically depicted solution is not included in t..

  Software implementation and software quality

Work packages are divided into three functional areas - Software Engineering, Software Implementation and Software Quality. The software engineering requires all the necessary engineering research, design and planning effort along with the docume..

  Software testing environment

Background: Smith Consulting has received some feedback and concerns that their processes and procedures are not sufficiently documented. This lack of professional documentation has caused some loss of potential contracts for the firm.

  Operations that the internally hosted website will require

Discuss the support operations that the internally hosted Website will require after implementation and Evaluate alternatives to the company self-hosting the site

  Calculate the error in the sense of least square

Calculate the error in the sense of least square when using the three models with the values.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd