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
irakobra [83]
2 years ago
6

How does a hard drive work

Computers and Technology
2 answers:
IgorC [24]2 years ago
7 0
You just have to put it into a computer and a file is gonna come up
ArbitrLikvidat [17]2 years ago
4 0
Put it in the computer
You might be interested in
C++
nikitadnepr [17]

Answer:

Check the explanation

Explanation:

<u>The Code</u>

#include <fstream>

#include <iostream>

#include <cmath>

#include <cstring>

#include <cstdlib>

#include <ctime>

using namespace std;

//Function Declarations

void fillArrayWithRandNos(int nos[],int size);

void displayArray(int nos[],int size);

double mean(int nos[],int size);

double variance(int nos[],int size);

double median(int nos[],int size);

int mode(int nos[],int size);

void histogram(int nos[],int size);

int main() {

  //Declaring variables

const int size=100;

srand(time(NULL));

 

// Creating array dynamically

int* nos = new int[size];

 

//Calling the functions

fillArrayWithRandNos(nos,size);

displayArray(nos,size);

cout<<"Mean :"<<mean(nos,size)<<endl;

cout<<"variance :"<<variance(nos,size)<<endl;

cout<<"Median :"<<median(nos,size)<<endl;

cout<<"Mode :"<<mode(nos,size)<<endl;

histogram(nos,size);

 

  return 0;

}

void fillArrayWithRandNos(int nos[],int size)

{

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

  {

      nos[i]=rand()%(45) + 55;

  }

}

void displayArray(int nos[],int size)

{

  cout<<"Displaying the array elements :"<<endl;

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

  {

      cout<<nos[i]<<" ";

      if((i+1)%10==0)

      cout<<endl;

  }

}

double mean(int nos[],int size)

{

  double sum=0;

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

  {

      sum+=nos[i];

  }

  return sum/size;

}

double variance(int nos[],int size)

{

  double avg=mean(nos,size);

 

double variance,sum=0;

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

{

sum+=pow(nos[i]-avg,2);

}

//calculating the standard deviation of nos[] array

variance=(double)sum/(size);

return variance;

}

double median(int nos[],int size)

{

      //This Logic will Sort the Array of elements in Ascending order

  int temp;

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

{

for (int j = i + 1; j < size; j++)

{

if (nos[i] > nos[j])

{

temp = nos[i];

nos[i] = nos[j];

nos[j] = temp;

}

}

}

 

int middle;

float med;

middle = (size / 2.0);

if (size % 2 == 0)

med = ((nos[middle - 1]) + (nos[middle])) / 2.0;

else

med = (nos[middle]);

return med;

}

int mode(int nos[],int size)

{

  int counter1 = 0, counter2, modevalue;

for (int i = 0; i < size; i++) {

counter2 = 0;

for (int j = i; j < size; j++) {

if (nos[i] == nos[j]) {

counter2++;

}

if (counter2 > counter1) {

counter1 = counter2;

modevalue = nos[i];

}

}

}

if (counter1 > 1)

return modevalue;

else

return 0;

}

void histogram(int nos[],int size)

{

  int hist[9]={0};

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

  {

      if(nos[i]>=55 && nos[i]<=59)

      {

      hist[0]++;

      }

      else if(nos[i]>=60 && nos[i]<=64)

      {

      hist[1]++;

      }

      else if(nos[i]>=65 && nos[i]<=69)

      {

      hist[2]++;

      }

      else if(nos[i]>=70 && nos[i]<=74)

      {

      hist[3]++;

      }

      else if(nos[i]>=75 && nos[i]<=79)

      {

      hist[4]++;

      }

      else if(nos[i]>=80 && nos[i]<=84)

      {

      hist[5]++;

      }

      else if(nos[i]>=85 && nos[i]<=89)

      {

      hist[6]++;

      }

      else if(nos[i]>=90 && nos[i]<=94)

      {

      hist[7]++;

      }

      else if(nos[i]>=95 && nos[i]<=99)

      {

      hist[8]++;

      }

  }

     

  cout<<"Displaying the count of numbers in each interval:"<<endl;

 

      int cnt=0;

  for(int i=55;i<=99;i+=5)

  {

  cout<<i<<"-"<<i+4<<"|"<<hist[cnt]<<endl;

 

      cnt++;

  }

 

  cout<<"Displaying the histogram :"<<endl;

  cnt=0;

  for(int i=55;i<=99;i+=5)

  {

  cout<<i<<"-"<<i+4<<"|";

  for(int j=0;j<hist[cnt];j++)

  {

      cout<<"*";

  }  

      cout<<endl;

      cnt++;

  }          

     

 

 

}

#########

___________________________

The output can be seen in the attached image below.

8 0
3 years ago
Write a program that calculates the amount of money the salesperson will earn from selling discount cards. java program
BaLLatris [955]

Answer:

import java.util.Scanner; public class Salesman2 {

public static void main(String[] args) { // TODO Auto-generated method stub double CommissionRate;

double TotalSales, Commission;

Scanner Read = new Scanner (System.in); System.out.println("Please enter total sales "); TotalSales=Read.nextDouble();

if (TotalSales<500)

CommissionRate=0.0;

else if (TotalSales>=500 && TotalSales <1000) CommissionRate=0.05;

else

CommissionRate=0.08;}

Commission = CommissionRate * TotalSales;

System.out.println("The Commision is: "+ Commission); }

}

}

4 0
2 years ago
Write code to take a String input from the user, then print the first and last letters of the string on one line. Sample run: En
Ainat [17]
<h2>Answer:</h2>

//import the Scanner class to allow for user input

import java.util.Scanner;

//Begin class definition

public class FirstAndLast{

   //Begin the main method

    public static void main(String []args){

       

       

       //****create an object of the Scanner class.

       //Call the object 'input' to receive user's input

       //from the console.

       Scanner input = new Scanner(System.in);

       

       //****create a prompt to tell the user what to do.

       System.out.println("Enter the string");

       

       //****receive the user's input

       //And store it in a String variable called 'str'

       String str =  input.next();

       

       //****get and print the first character.

       //substring(0, 1) - means get all the characters starting

       //from the lower bound (index 0) up to, but not including the upper

       //bound(index 1).

       //That technically means the first character.

       System.out.print(str.substring(0,1));

       

       //****get and print the last character

       //1. str.length() will return the number of character in the string 'str'.

       //This is also the length of the string

       //2. substring(str.length() - 1) - means get all the characters starting

       // from index that is one less than the length of the string to the last

       // index (since an upper bound is not specified).

       // This technically means the last character.

       System.out.print(str.substring(str.length()-1));

       

       

       

    }  // end of main method

   

} //end of class definition

<h2>Explanation:</h2>

The code has been written in Java and it contains comments explaining important parts of the code. Kindly go through the comments.

The source code and a sample output have also been attached to this response.

To run this program, copy the code in the source code inside a Java IDE or editor and save it as FirstAndLast.java

Download java
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
4c53f66d970acf88b251b2cf41bcdaf6.png
3 0
2 years ago
On the Direct Marketing worksheet, create appropriate range names for Design Fee (cell B8), Cost Per Ad (cell B9), Total Clicks
Inessa [10]

Answer:

See explanation below

Explanation:

Named ranges are a very important tool in Microsoft Excel. It is used in assigning a name to a particular number of cells. It is great for automation and makes formula much easy to understand and use.

One way to create named ranges is theory the Name Box.

To create named ranges in the design marketing sheet we do this;

1) We click on cell B8 and then navigate to the name box at the top right corner of the sheet just above the column A.

•The name box is where the cell address of any cell that is active is displayed.

•You would see that “B8” is displayed on the name box.

• Double click on the name box and type in the appropriate name, in this case - Design_Fee.

• Press enter and you have your named range.

You do the same for the other named ranges.

Note that: Named ranges must contain letters, numbers or underscore.

4 0
3 years ago
What is the Difference between CUI and GUI
Fynjy0 [20]

Hi there!


GUI Means Graphical user interface


CUI means  Controlled Unclassified Information


Theres the difference they are completely different from each other.


PLEASE MARK BRAINLIEST

-WeasuLL

7 0
3 years ago
Read 2 more answers
Other questions:
  • Pros and cons of Processor Throttling or Scaling?
    13·1 answer
  • A network administrator issues the show vlan brief command while troubleshooting a user support ticket. What output will be disp
    15·2 answers
  • True or False<br><br> The signing of Act 26 made Cyber Harassment of a Child a crime.
    14·1 answer
  • What is master slide and tell about master slide
    6·1 answer
  • Templates allow for the quick creation of _____.
    7·1 answer
  • In the RGB model, which color is formed by combining the constituent colors?
    14·2 answers
  • Why would "ExpirationDate” be a poor choice as a primary key?
    11·1 answer
  • Which of these is an online presentation tool?
    9·2 answers
  • Among the second generation home console companies,which managed to come out on top
    10·1 answer
  • Besides your computer, where else can you find and use an operating system?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!