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
Feliz [49]
3 years ago
10

Write the definition of a method printarray, which has one parameter , an array of int s. the method does not return a value . t

he method prints out each element of the array , on a line by itself, in the order the elements appear in the array , and does not print anything else.
Computers and Technology
1 answer:
stealth61 [152]3 years ago
6 0
<span>void printArray(int a[ ]) {
</span> int i;   <span>for (i = 0; i &lt; a.length; i++){
</span>  <span>System.out.print(a[i]);
</span> System.out.println();   <span>}
</span> }
You might be interested in
In Scheme, the form (symbol-length? 'James) will return: Group of answer choices 0 5 6 error message
Nadya [2.5K]

Answer:

an error message

Explanation:

The return value is the value which is sent back by the function to a place in the code from where the \text{function} was called from. Its main work is to return a value form the function.

In the context, the form of  "(symbol-length? 'James)" in Scheme will return the  value --- ' an error message'.

7 0
2 years ago
A basic program to find the area of a square​
uranmaximum [27]

The area of a square is simply the square of the side. So, you only need to write a program that receives a number as input, which is the side of the square, and returns that number squared, which will be the area of the square.

You didn't specify any language, so for example here's a C implementation that receives the side from the user and returns the area:

#include <stdio.h>

int main()

{

   double side, area;

   

   do{

       printf("Enter the side of the square (must be >0): ");

       scanf("%lf", &side);

   } while(side<=0);

   area = side * side;

   printf("The area is %lf", area);

}

4 0
3 years ago
You can invoke or call a method from another program or method. When methods must share data, you can pass the data into and ret
san4es73 [151]

Answer:

1. You can invoke or call a method from another program or method: TRUE

2. When methods must share data, you can pass the data into and return the data out of methods: TRUE

3. A method could be called using any numeric value as an argument, whether it is a variable, a named constant, or a literal constant: TRUE

Explanation:

4 0
3 years ago
Enter the cube's edge: 4<br> The surface area is 96 square units.<br> Python
mr_godi [17]

Answer:

See the program code below.

Explanation:

def cube_SA(edge):

 edge = int(input("Enter the cube's edge: "))

 sa = edge * edge * 6

 print("The surface area is {} square units".format(sa))

cube_SA(4)

Best Regards!

5 0
3 years ago
Consider the following program segment. ifstream inFile; //Line 1 int x, y; //Line 2 ... //Line 3 inFile &gt;&gt; x &gt;&gt; y;
MrMuchimi

Answer:

inFile.open("progdata.dat");

Explanation:

This command opens the file which is passed to it as an argument. We are quite used to the C++'s cin and cout functions contained in iostream library for reading and writing data, however, when working will real-life stuff, we find ourselves working with huge data saved as separate files and require our programs to read them, manipulate them and possibly write back to the files... The first operation usually carried out before a file can be read or written to is open

6 0
3 years ago
Other questions:
  • Is a protocol that allows users to log on to and access a remote computer?
    8·1 answer
  • What is the equivalent of film speed in digital cameras?
    6·2 answers
  • An effectively distributed resume will get an interview
    12·2 answers
  • A _____ captures the pattern in a _____ and sends it to the computer, where special software translates the _____ into meaningfu
    8·1 answer
  • What can act as a buffer against unemployment
    11·1 answer
  • Which is a good way to improve your credit score
    5·1 answer
  • Nicotine us a dangerous chemical found in Cigarettes; it is accompanied by two other very harmful chemicals. These are
    15·1 answer
  • Does anyone know this? Can someone please help me? I’ll give brainliest!!
    7·1 answer
  • What are some applications of computer in public administration?​
    8·1 answer
  • How each programming language differs in terms of constructs, techniques, use and requirements?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!