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

Write a method named square that accepts an integer argument and returns the square of that argument.

Computers and Technology
1 answer:
BaLLatris [955]3 years ago
7 0

Answer:

The method is as follows:

double square(int num){

return num*num;

}

Explanation:

Written in C++

This first line defines the method

double square(int num){

This line returns the square of num

return num*num;

}

<em>I've added the full program as an attachment where I include the main method</em>

Download cpp
You might be interested in
Write code which takes a sentence as an input from the user and then prints the length of the first word in that sentence.
Afina-wow [57]

import java.util.Scanner;

public class U2_L3_Activity_Four {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter a sentence.");

       String sent = scan.nextLine();

       int count = 0;

       for (int i = 0; i < sent.length(); i++){

           char c = sent.charAt(i);

           if (c != ' '){

               count++;

       }

           else{

               break;

           }

       

   }

       System.out.println("The first word is " + count +" letters long");

   

   }

}

We check to see when the first space occurs in our string and we add one to our count variable for every letter before that. I hope this helps!

7 0
2 years ago
The following program is run. Then the user clicks the "bottomButton" TWO TIMES. What will be displayed in the console?
IrinaK [193]

Answer:

A. aaa

bbb

ccc

ccc

ddd

B. bbb

ddd

ccc

ccc

C. bbb

ddd

aaa

aaa

D. bbb

ccc

ccc

ddd

8 0
3 years ago
Read 2 more answers
Which career qualification is unique to the Energy Transmission career pathway and not to the Energy Distribution pathway? color
Sergeeva-Olga [200]

Answer:

a, c, d

Explanation:

6 0
3 years ago
Read 2 more answers
Type which type of interference we will install after installing operating system​
pentagon [3]

Answer:

There are different kinds of operating systems: such as Windows, Linux and Mac OS

There are also different versions of these operating systems, e.g. Windows 7, 8 and 10

Operating systems can be used with different user interfaces (UI): text user interfaces (TUI) and graphical user interfaces (GUI) as examples

Graphical user interfaces have many similarities in different operating systems: such as the start menu, desktop etc.

When you can recognize the typical parts of each operating system’s user interface, you will mostly be able to use both Windows and Linux as well as e.g. Mac OS.

THE ROLE OF OPERATING SYSTEM IN THE COMPUTER

An operating system (OS) is a set of programs which ensures the interoperability of the hardware and software in your computer. The operating system enables, among other things,

the identification and activation of devices connected to the computer,

the installation and use of programs, and

the handling of files.

8 0
3 years ago
Which of the following is not a type of bank? (Everfi)
Zinaida [17]

Answer

Pay Day Lender

Explanation

A bank is a financial institution which is authorized by the government to accept deposits inform of cash or cheque from the public who are the customers, and it creates a credit. It saves money to for the customers and also provides security for the customers money. It also lends money to the customers as loan where they pay with interest within a given time. There are many types of banks which include credit unions, online banks,industrial, agricultural, retail banks and many others.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Which of these statements regarding mobile games is true? A. They are typically played indoors. B. They have detailed environmen
    7·1 answer
  • Which type of wireless network is<br> controlled through a wireless<br> access point?
    7·1 answer
  • 6) RAM, 5 main memory<br>which storage conbe used<br>as permanent storage<br>Rom<br>a) R<br>)​
    8·2 answers
  • The _____ stage occurs when advancing IT leads to the development of a more advanced IT product making the old one obsolete and
    10·1 answer
  • What is the meaning of the word joystick
    6·2 answers
  • Identify an advantage of the software as a service (SaaS) approach in public cloud computing. Group of answer choices The user h
    5·1 answer
  • g Write a function named vowels that has one parameter and will return two values. Here is how the function works: Use a while l
    9·1 answer
  • When we code an algorithm, we need to provide the commands in the order we want the
    10·1 answer
  • It was field day for the upper grades at Rock Creek School,
    7·1 answer
  • To reduce the potential for repetitive stress injury you should use proper?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!