1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mash [69]
3 years ago
6

Write a C function check(x, y, n) that returns 1 if both x and y fall between 0 and n-1 inclusive. The function should return 0

otherwise. Assume that x, y and n are all of type int.
Computers and Technology
1 answer:
fomenos3 years ago
5 0

Answer:

<em>See comments for line by line explanation (Lines that begins with // are comments)</em>

<em>The function written in C, is as follows:</em>

//The function starts here

int check(x,y,n)

{

//This if condition checks if x and y are within range of 0 to n - 1

if((x>=0 && x<=n-1) && (y>=0 && y<=n-1))

{

//If the if conditional statement is true, the function returns 1

 return 1;

}

else

{

//If the if conditional statement is false, the function returns 0

 return 0;

}

//The if condition ends here

}

//The function ends here

Explanation:

You might be interested in
Which of the follow is an example of an integer?<br> "1.091"<br> "number"<br> 15<br> name
UkoKoshka [18]

Answer:

The answer is 15

Explanation:

A integer is a whole number, the only wholenumber present is 15

Hope this helps :)

8 0
2 years ago
In the design phase of the systems development life cycle (SDLC), the _____ indicates hardware and software, such as specifying
Genrish500 [490]

Answer:

Option A

Explanation:

6 0
3 years ago
1. Create a function called count_to_three() , remember the colon.
Len [333]

Answer:

This program is written using Python programming language

The program doesn't make use of comments

See attachment for proper format of the program

def count_to_three():

print("One")

print("Two")

print("Three")

count_to_three()

Explanation:

The first line of the program defines the function count_to_three() with no parameters, passed to it

Line 2 to 4 of the program is indent and each line make use of print() function

Line 2 prints "One", Line 3 prints "Two" and Line 4 prints "Three" without quotes

The last line of the program calls the defined function

4 0
3 years ago
Before u can open and edit a file, you need to zip it, T/F
koban [17]

Answer

False, it is not necessary that you need to zip a file always when you are opening and editing a file

<u><em>PLS MARK BRAINLIEST</em></u>

5 0
3 years ago
#include using namespace std; double CelsiusToKelvin(double valueCelsius) { double valueKelvin; valueKelvin = valueCelsius + 273
otez555 [7]

Answer:

//Below are the function which the user needs to add on the place of the "Your solution goes here".

double KelvinToCelsius(double valueKelvin)

{

   double valueCelsius;

   valueCelsius = valueKelvin - 273.15;

   return valueCelsius;

}

Explanation:

Missing information : The above question is missing which states to define one function which name is "KelvinToCelsius" and which takes one argument and changes the kelvin value into Celsius value. One header file syntax is also missing on the above question.

  • The above question wants to add a function to the place of the "Your solution goes here" and the work of the function is defined on the question.
  • So the above-defined function is used to return the value of Celsius if the user passes the value of kelvin.
  • The above-question also holds one function which takes the value of kelvin and returned Celsius, which returns value "283.15".
  • So if a user passes "283.15 for the kelvin value, then he got 10 which is defined as Celsius value on the question".
3 0
4 years ago
Other questions:
  • Explain how to use fortran programming in details
    14·1 answer
  • Which of the following is a Microsoft solution that runs on a Microsoft Terminal Services server but appears, to end users, as i
    10·1 answer
  • Use the RSA cipher with public key n = 713 = 23 · 31 and e = 43. Encode the word "KING" into its numeric equivalent and encrypt
    15·1 answer
  • Vinton cerf has been called one of main fathers of the internet. what internet organizations did he chair or help found? what in
    13·1 answer
  • Which of the following statements about the use of desktop publishing software is true? A. There's no visible difference between
    9·1 answer
  • Multiple arrays. Jump to level 1 For any element in keysList with a value greater than 40, print the corresponding value in item
    7·2 answers
  • Although a tablet can connect to a cellular network, it cannot be used as a
    11·2 answers
  • +
    8·2 answers
  • In “Plugged In,” the author’s purpose is to persuade. Which of the following quotes from the text shows that the author’s purpos
    15·1 answer
  • Self-driving cars are a result of developments in which field of computer<br> science?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!