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
n200080 [17]
3 years ago
14

What is one purpose of an algorithm

Computers and Technology
1 answer:
adelina 88 [10]3 years ago
4 0

Answer:

Algorithms is formula for solving a problem. It is helpful because it specifically give instructions detail to computer to what a computer should perform a specific task.

For e.g. calculating report cards.

You might be interested in
How do I add and accept a friend on this app?
lesya692 [45]

Answer:

you press the person icon and they get invatation and they accept or they dont

Explanation:

7 0
3 years ago
We will use linear interpolation in a C program to estimate the population of NJ between the years of the census, which takes pl
nikklg [1K]

Answer:

See explaination for program code

Explanation:

program code below:

#include<stdio.h>

int main()

{

//file pointer to read from the file

FILE *fptr;

//array to store the years

int years[50];

//array to store the population

float population[50];

int n = 0, j;

//variables for the linear interpolation formula

float x0,y0,x1,y1,xp,yp;

//opening the file

fptr = fopen("njpopulation.dat", "r");

if (fptr != NULL)

{

//reading data for the file

while(fscanf(fptr, "%d %f", &years[n], &population[n]) == 2)

n++;

//prompting the user

int year = -1;

printf("Enter the years for which the population is to be estimated. Enter 0 to stop.\n\n");

while(year != 0)

{

printf("Enter the year (1790 - 2010) : ");

scanf("%d", &year);

if (year >= 1790 && year <= 2010)

{

//calculating the estimation

xp = year;

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

{

if (year == years[j])

{

//if the year is already in the table no nedd for calculation

yp = population[j];

}

else if (j != n - 1)

{

//finding the surrounding census years

if (year > years[j] && year < years[j + 1])

{

//point one

x0 = years[j];

y0 = population[j];

//point two

x1 = years[j + 1];

y1 = population[j + 1];

//interpolation formula

yp = y0 + ((y1-y0)/(x1-x0)) * (xp - x0);

}

}

}

printf("\nEstimated population for year %d : %.2f\n\n", year, yp);

}

else if (year != 0)

{

printf("\nInvalid chioce!!\n\n");

}

}

printf("\nAborting!!");

}

else

{

printf("File cannot be opened!!");

}

close(fptr);

return 0;

}

OUTPUT :

Enter the years for which the population is to be estimated. Enter 0 to stop.

Enter the year (1790 - 2010) : 1790

Estimated population for year 1790 : 184139.00

Enter the year (1790 - 2010) : 1855

Estimated population for year 1855 : 580795.00

Enter the year (1790 - 2010) : 2010

Estimated population for year 2010 : 8791894.00

Enter the year (1790 - 2010) : 4545

Invalid chioce!!

Enter the year (1790 - 2010) : 1992

Estimated population for year 1992 : 7867020.50

Enter the year (1790 - 2010) : 0

Aborting!!

5 0
3 years ago
Opinion on sandshrew​
Alex

Answer:Sandshrew is cute

Explanation:

3 0
3 years ago
How many binary digits does a single hexadecimal digit represent?
Anna35 [415]
Four binary digits.  So letter D.


8 0
3 years ago
Lawanda starts a new job today at a company that delivers thousands of packages each day. Identify three ways in which Lawanda's
jek_recluse [69]

Answer:

use your own opinion

Explanation:

7 0
3 years ago
Other questions:
  • A(n) ____________________ stores copies of data or programs that are located on the hard drive and that might be needed soon in
    9·1 answer
  • When reading a ____ language, we use our understanding of the richness of the language's vocabulary to extract the meaning. geop
    10·1 answer
  • Which is a feature of a strong thesis statement? A) It presents only the facts. B) It is open-ended. C) It answers the central q
    15·1 answer
  • Which option describes wearable technology?
    9·1 answer
  • When you use information hiding by selecting which properties and methods of a class to make public, you are assured that your d
    14·1 answer
  • Match the parts of the website address with its correct explanation. http://www.usa.gov/Agencies/federal.shtm/​
    5·2 answers
  • Where does Reiner take eren after they have a fight?
    7·2 answers
  • 4. Contoso, Ltd. has a vigorous Office 365 and Azure cloud-service presence.
    8·1 answer
  • Hellpppppppppppppppp
    13·2 answers
  • Content area a leased asset will appear on the balance sheet as a long-term asset. true false'
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!