answer.
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
mamaluj [8]
2 years ago
11

The area of a square is stored in a double variable named area. write an expression whose value is length of the diagonal of the

square java.
Computers and Technology
1 answer:
cestrela7 [59]2 years ago
5 0

Answer:

The correct answer to the following question will be "Math.sqrt(area*2)".

Explanation:

  • The Math.sqrt( ) method in JavaScript is used to find the squares root of the given figure provided to the feature as a variable.
  • Syntax Math.sqrt(value) Variables: this function takes a single variable value that represents the amount whose square root is to be determined.
  • The area of the figure is the number of squares needed to cover it entirely, like the tiles on the ground.

Area of the square = side times of the side.

Because each side of the square will be the same, the width of the square will only be one side.

Therefore, it would be the right answer.

You might be interested in
Kelli is unable to find a shape that meets her needs which feature in PowerPoint should she use to create shapes that are comple
sergij07 [2.7K]

In order to customize a shape, Kelli should first add a basic shape and select it. After that, she needs to access the format tab where she can find the option to edit the selected shape. She can modify the selected shape or change it to a free-form according to her needs.

<u>Explanation:</u>

Microsoft PowerPoint provides an easy way for customizing the shapes according to the needs of the user.

Although PowerPoint provides many basic shapes that suit the need of most of the users but in exceptional cases, changes are always welcome. So in order to customize a shape, she should follow the steps which has been explained above.

5 0
2 years ago
Write a program that prompts the user to enter 50 integers and stores them in an array. The program then determines and outputs
Marrrta [24]

Answer:

Here is code in C++.

#include <bits/stdc++.h>

using namespace std;

int main()

{  

int n=50;

   // integer array to store 50 integers

   int arr[n];

   cout << "Enter 50 integers: ";

   //read 50 integers into array

   for (int i = 0; i < n; i++)

       cin >> arr[i];

   cout << endl;

   

   //sort the array

   sort(arr,arr+n);

   

   // find all the pairs which give sum equal to any element of the array

   for (int i = 0; i < n; i++)

   {

       cout<<"pair which give sum equal to  ";

       cout << arr[i] <<" is :";

       for (int j = 0; j < n; j++)

           for (int k = j + 1; k < n; k++)

               if (arr[i] == arr[j] + arr[k])

                   cout <<"("<<arr[j]<<" & "<< arr[k] <<")"<<",";

       cout << endl;

       cout << "*******************************" << endl;;

   }

   return 0;

}

Explanation:

Read 50 integers into an array from user.Sort the array in ascending order.Travers the sorted array and find all pairs which give sum of equal to any element of the array.Then print all such pairs.

Output:

Enter 50 integers: 23 30 34 1 3 4 9 12 96 92 80 84 123 54 67 87 34 55 21 38 29 111 10 44 103 47 83 72 77 88 80 56 49 5 102 166 134 200 205 188 178 133 154 148 162 191 193 207 209 44                                                                                                                                                                    

 pair which give sum equal to  1 is :                                                *******************************

pair which give sum equal to  3 is :                                                     *******************************    

pair which give sum equal to  4 is :(1 & 3),                                         ******************************    

pair which give sum equal to  5 is :(1 & 4),                                         ******************************    

pair which give sum equal to  9 is :(4 & 5),                                         *******************************  

pair which give sum equal to  10 is :(1 & 9),                                       *******************************  

pair which give sum equal to  12 is :(3 & 9),                                       *******************************  

pair which give sum equal to  21 is :(9 & 12),                                      *******************************  

pair which give sum equal to  23 is :                                                    *******************************    

pair which give sum equal to  29 is :                                                    *******************************    

pair which give sum equal to  30 is :(1 & 29),(9 & 21),                        *******************************  

pair which give sum equal to  34 is :(4 & 30),(5 & 29),                     *******************************    

pair which give sum equal to  34 is :(4 & 30),(5 & 29),                     *******************************    

pair which give sum equal to  38 is :(4 & 34),(4 & 34),(9 & 29),  

.

.

.

.

  

5 0
2 years ago
Your assignment is to write an assembly language program which read a string and print it in uppercase. This program asks the us
-BARSIC- [3]

Answer:

Check the explanation

Explanation:

.data

prompt: .asciiz "Please enter your string :"

result_str: .asciiz "\nYour captalized string :"

error_prompt: .asciiz "\nInvalid Entry !"

buffer: .space 20

.text

.globl __start

__start:

ASKING_STR:

la $a0,prompt

li $v0,4

syscall

li $v0,8 #take in input

la $a0, buffer #load byte space into address

li $a1, 20 # allot the byte space for string

move $t0,$a0 #save string to t0

syscall

li $v0, 4

li $t0, 0

loop:

lb $t1, buffer($t0)

beq $t1, 0, exit

slti $t2,$t1,91

bne $t2,$0,UPPER_CHECK

slti $t2,$t1,123

bne $t2,$0,LOWER_TO_UPPER

UPPER_CHECK:

slti $t2,$t1,65

bne $t2,$0,INVALID_ENTRY

slti $t2,$t1,90

bne $t2,$0,NEXT

j INVALID_ENTRY

LOWER_TO_UPPER:

sub $t1, $t1, 32

sb $t1, buffer($t0)

NEXT:

addi $t0, $t0, 1

j loop

INVALID_ENTRY:

li $v0, 4

la $a0, error_prompt

syscall

j ASKING_STR

exit:

li $v0, 4

la $a0, result_str

syscall

li $v0, 4

la $a0, buffer

syscall

li $v0, 10

syscall

4 0
2 years ago
Write code that prints: Ready! firstNumber ... 2 1 Run! Your code should contain a for loop. Print a newline after each number a
LUCKY_DIMON [66]

Complete Question:

Write code that prints: Ready! userNum ... 2 1 Blastoff! Your code should contain a for loop. Print a newline after each number and after each line of text Ex: userNum = 3 outputs: Ready! 3 2 1 Blastoff!

Answer:

public class TestClock {

   public static void main(String[] args) {

       int userNum= 3;

       System.out.print("Ready! "+userNum+" ");

       for (int i=userNum;i>1; i--){

           userNum--;

           System.out.print(userNum+" ");

       }

       System.out.println("Blasoff!");

   }

}

Explanation:

  1. Create and initialize userNum
  2. Use System.out.print to print the sequence ("Ready! "+userNum+" ") on same line
  3. use for statement with this condition for (int i=userNum;i>1; i--) decremeent userNum by 1 after each loop iteration and print userNum on same line
  4. outside the for loop print "Blasoff!"
3 0
2 years ago
Read 3 more answers
What are pixels that are the exact same between multiple frames called?
Oxana [17]

Answer:

the answer is temporal redundancy

Explanation:

Computer Definition. Pixels in two video frames that have the same values in the same location. Exploiting temporal redundancy is one of the primary techniques in video compression (see interframe coding). Contrast with spatial redundancy.

6 0
2 years ago
Other questions:
  • What are the pros and cons of using unique closing reserved words on compound statements?
    15·1 answer
  • An online game is played with two dice. In this context, explain what is meant by decomposition in a simple way.
    15·1 answer
  • When you use a while loop to compute the product of several values, you should initialize the variables holding the product to _
    15·1 answer
  • 1A network administrator notices that some newly installed Ethernet cabling is carrying corrupt and distorted data signals. The
    5·1 answer
  • Which of the following is NOT a benefit of virtual memory? speed up of process creation increases in the effective access time o
    6·1 answer
  • An encryption system works by shifting the binary value for a letter one place to the left. "A" then becomes: 1 1 0 0 0 0 1 0 Th
    12·1 answer
  • Describe how the process of sampling, RGB pixels, and binary sequences work together to display a digital color image
    14·1 answer
  • You know that you should check the room for security against unwanted entry do you check locks on doors and windows. What else d
    15·1 answer
  • Write a function named shout. The function should accept a string argument and display it in uppercase with an exclamation mark
    6·1 answer
  • daniel wants to buy a computer to use for playing games after work. he loves racing games and wants to make sure his device has
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!