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

  A part of software processes

Which of these software engineering activities are not a part of software processes ? a) Software dependence. b) Software development.

  Fixing errors for java code

The code compiles properly and runs, but result is not what you expected; output is similar to the following, Describe what the problem is how to fix it.

  1 explain three forces leading companies to pursue

1. explain three forces leading companies to pursue international operations.2. explain the concept of protectionism.

  Find problems which software engineers dealt with in past

The lecture and text discussed challenges and problems which Software Engineers have dealt with in the past. Investigate what you consider to be the challenges facing software engineering in the next 20 years.

  Analysing the effects of changes organisations

What were the external and internal forces that drove that change? How did organisation leaders help facilitate change within the organisation?

  Identify each path and its total duration

Identify each path and its total duration and Identify the critical path and explain its implications for this project

  Recognize possible use cases-actors to make use case diagram

Recognize possible use cases and actors, and create use case diagram for Personal Trainer information system. Choose one of the use cases and create a class digram.

  Explain the conceptual terms for analyzing human interaction

Describe the relationship between the cognitive principles and their application to interfaces and products.

  Prepare a business case for project

Business Case - Using the information that you compiled in the project proposal, prepare a Business Case for this project.

  Information flow complexity

Cyclomatic complexity, monitoring devices, wireless dial-out device with controller, Request for Proposals (RFPs), Weighted IFC

  Where as today most personal computer software is purchased

Why do you think that so much of the software that ran on large-scale computers was custom written by programmers, where as today most personal computer software is purchased off the shelf

  Develop an erm and eerm

Develop an ERM and EERM for the following case study. Include: Entities (incluing names), Relationships (including names), An airline has multiple planes, Each plane goes on multiple flights

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