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
Paul [167]
3 years ago
8

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.
Computers and Technology
1 answer:
ale4655 [162]3 years ago
8 0
You should specify what language you're using in these types of questions; here's an example in C++.

#include <iostream>
#include <math>

int main()
{
// example area
double area = 25;

// square root the area to find the length
// then apply basic pythagoras
double diagonal = sqrt(pow(sqrt(area), 2) + pow(sqrt(area), 2));

return 0;
}
You might be interested in
A hacker successfully modified the sale price of items purchased through your company's web site. During the investigation that
Korvikt [17]

Answer:

By modifying the hidden form values that is in a local copy of the company web page

Explanation:

In a situation were the hacker successful change the price of the items he/she purchased through the web site of the company's in which the company web server as well as the company Oracle database were not compromised directly which means that the most likely method in which the attacker used to modified the sale price of the items he/she purchased was by modifying the HIDDEN FORM VALUE that was in the local copy of the company web page making it easy for the HIDDEN FORM VALUE to be vulnerable to the hacker because the hidden form value did not store the company server side information or data but only store the company software state information which is why HIDDEN FORM VALUE should not be trusted.

5 0
2 years ago
Secure Hashing Algorithm (SHA) is an algorithm for generating cryptographically secure one-way hash, published by the National I
Naily [24]

Answer:

64 byte.

It's not bit is byte.

Explanation:

Secure Hash Algorithms (SHA) :- These are a family of cryptographic hash functions. There are basically four types of secure hash algorithms for generating cryptographically secure one-way hash.They are as following:-

SHA-0

SHA-1

SHA-2

SHA-3

SHA -2 consists of SHA-512 and the block size used by it is 64 byte or 512 bits.

8 0
3 years ago
Write a C program to prform simple C aritlimetic calculations. The user is to enter a simple expression(integer operaior integer
larisa86 [58]

Answer:

Here is the C program:

#include <stdio.h>  //to use input output functions

//functions prototype

unsigned int mod(unsigned int a, unsigned int b);  

unsigned int mul(unsigned int a, unsigned int b);  

unsigned int sub( unsigned int a,unsigned int b);

float divide(unsigned int a,unsigned int b);  

unsigned int add( unsigned int a,unsigned int b);  

int main()  {  //start of main method

unsigned int a, b;   //declare variables to store the operands

char d;  //declare variable to store the operator

printf("Enter an operator:  ");   //prompts user to enter an operator

scanf("%c",&d);  //reads the operator from use

getchar();  //gets a character

while (d!='q')   { //keeps iterating until user enters q to quit

printf("Enter 1st operand: ");   //prompts user to enter first operand

scanf("%d",&a);   //reads first operand from user

getchar();  //reads character

printf("Enter 2nd operand: ");   //prompts user to enter second operand

scanf("%d",&b);   //reads second operand from user

getchar();  

if (d=='%')  {   //if the character of operator is a mod

printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = ");  //displays =

mod(a,b);  }  //displays computed modulo of two input operands

if (d=='*')   //if the input character is for multiplication operator

{printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = ");  //displays =

mul(a,b); }  //displays computed multiplication

if (d=='+')  {  //if the input character is for addition operator

printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = "); // displays =

add(a,b);  }   //displays computed addition

if (d=='/')  {  //if the input character is for division operator

printf("%d",a); // prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = ");  //displays =

divide(a,b);  }   //displays computed division

if (d=='-')  {  //if the input character is for subtraction operator

printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b); // displays operand 2

printf(" = ");  //displays =

sub(a,b);  }  //displays computed subtraction

printf("Enter an operator: ");   //asks again to enter an operator

scanf("%c",&d);  //reads operator from user

getchar();  }  }   //gets character

unsigned int mod( unsigned int a, unsigned int b){  //function to compute modulo of two integers with no sign

     int c = a%b;  //computes mod

    printf("%d",c);  }  //displays mod result

unsigned int add(unsigned int a, unsigned int b){     // function to compute addition of two integers

    int c = a+b; //computes addition

    printf("%d\n",c);  } //displays result of addition

unsigned int mul(unsigned int a, unsigned int b){       //function to compute multiplication of two integers

    int c = a*b;  //multiplies two integers

   printf("%d\n",c); }  //displays result of multiplication

float divide(unsigned int a, unsigned int b){   //function to compute division of two integers

    float c = a/b;  //divides two integers and stores result in floating point variable c

    printf("%f\n",c);  } //displays result of division

unsigned int sub(unsigned int a, unsigned int b){       //function to compute subtraction of two integers

    int c = a-b;  //subtracts two integers

    printf("%d\n",c);  }  //displays result of subtraction

Explanation:

The program is well explained in the comments mentioned with each line of the program. The program uses while loop that keeps asking user to select an operator and two operands to perform arithmetic calculations. The if conditions are used to check what arithmetic calculation is to be performed based on user choice of operand and calls the relevant function to perform calculation. There are five functions that perform addition, modulo, subtraction, division and multiplication and display the result of computation. The screenshot of output is attached.

4 0
3 years ago
What is a method? an object instantiated from a class a coordinated sequence of instructions that will be carried out when reque
yKpoI14uk [10]

Complete Question:

What is a method?

A. An object instantiated from a class

B. An elegant and efficient way of programming

C. A coordinated sequence of instructions that will be carried out when requested

D. Using Alice control structures such as a a "Loop" to shorten code

Answer:

C. A coordinated sequence of instructions that will be carried out when requested

Explanation:

A method also known as function or procedure in other languages is a written set of code with a name and parameter list that can be requested/ called/invoked by typing out its name to carryout its function. A method can be seen as a  subprogram which carries out some action on data and most times gives back (returns) a value.

7 0
2 years ago
Why can i go to discord if my school blocks it-
finlep [7]

Answer:

They didn't do it right.

Explanation:

5 0
3 years ago
Other questions:
  • ________ databases are better than relational databases at handling unstructured data such as audio clips, video clips, and pict
    11·1 answer
  • When you select Insert and click on a shape the mouse pointer turns into a/an
    5·2 answers
  • Strong emotions can interfere with your ability to
    15·1 answer
  • Which of the following method calls are legal?a. mathMethod(x);b. mathMethod(y);c. mathMethod(x, y);d. mathMethod(x + y);e. math
    5·1 answer
  • Whats the answer to 9? i really need help with this in the next 20 minutes. ty if u help me!
    9·1 answer
  • A _____ are devices that permit a user to connect to a digital t-carrier service.
    6·1 answer
  • Define a lambda function that accepts one argument (a list of strings) and returns a list of only the words that start with an '
    9·1 answer
  • What is a simulation?
    5·2 answers
  • you are working on creating a business document with two other co-workers. Based on just information, which of the following pre
    14·1 answer
  • After turning on your computer ,it prompts you to type a password to continue the boot process. However ,you forgot the password
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!