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
Tcecarenko [31]
3 years ago
9

Why do we use if statements?

Computers and Technology
1 answer:
Luden [163]3 years ago
4 0
Answer is 2 i’m pretty sure
You might be interested in
I need help to find out what is wrong with this program and my variable, "exponent" comes out as 0 in the output instead of the
sweet-ann [11.9K]

You're substracting one from the variable "exponent" with every iteration of the loop, and you told it to break out of the loop once "exponent" is 0, therefore, it's always going to end up as 0 at the end.


If you want to keep the input from the user, then declare another variable like "counter" and assign the value of "exponent" to it and use it for the loop


Or even better, do this for the loop:

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

{

//Code here

}

3 0
3 years ago
Which of the examples is part of client-side code?
ivolga24 [154]

Answer:

I think it is A(update bank account balance)

not really sure

4 0
3 years ago
Does anyone have any social media message me
Mademuasel [1]
What's your username on them?
5 0
3 years ago
You are trying to access the Wi-Fi network at a coffee shop. What protocol will this type of wireless networking most likely use
Anna71 [15]

The wireless network is called WAP protocol

8 0
3 years ago
Write a C program to calculate and display the coordinates of midpoint - M of a linesegment between two given points - say A and
pychu [463]

Answer:

//Program in C.

// header file

#include <stdio.h>

#include <math.h>

// main function

int main(void) {

   // variables

float x1,y1,x2,y2;

float s,xm,ym,d;

// ask to enter x coordinate of A

printf("Enter coordinate (x) of point A:");

// read x1

scanf("%f",&x1);

// ask to enter y coordinate of A

printf("Enter coordinate (y)  of point A:");

// read y1

scanf("%f",&y1);

// ask to enter x coordinate of B

printf("Enter coordinate (x) of point B:");

//read x2

scanf("%f",&x2);

// ask to enter y coordinate of B

printf("Enter coordinate (y) of point B:");

// read y2

scanf("%f",&y2);

// calculate Midpoint of A and B

xm=(x1+x2)/2;

ym=(y1+y2)/2;

// calculate slope of the line

s=(y2-y1)/(x2-x1);

// calculate Distance between two points

d=sqrt(((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1)));

// print result

printf("Midpoint of both the point is: %f %f",xm,ym);

printf("\nSlope of both the line is: %f",s);

printf("\nDistance between both the point is: %f",d);

return 0;

}

Explanation:

Read the x & y coordinates of both the points.Then calculate the Midpoint of both the and assign it to variables "xm"&"ym".Then calculate the slope of the line and assign it to variable "s".Then find the distance between the two points and assign it to variable "d".Print all these results.

Output:

Enter coordinate (x) of point A:2

Enter coordinate (y) of point A:3

Enter coordinate (x) of point B:9

Enter coordinate (y) of point B:8

Midpoint of both the point is: 5.500000 5.500000

Slope of both the line is: 0.714286

Distance between both the point is: 8.602325

6 0
3 years ago
Other questions:
  • Consider the folloeing website URL:http://www.briannasblog.com. What does the "http://" represent?
    11·1 answer
  • What is the best overall approach to education and career development for IT professionals?
    14·1 answer
  • Can I recover my data from HDD if I just started formatting but did not finish it? (I ceased it!)
    7·1 answer
  • You are writing a report using a template provided by your supervisor. If you increase the margins around your pages by 30 perce
    5·1 answer
  • PLEASE HELP TAKING A TEST!!!
    10·2 answers
  • A PenTester has successfully exploited a remote host on a clients’ network. They want to create a backdoor on the host for futur
    11·1 answer
  • To hide the shaded space between pages, ____. select one:
    10·1 answer
  • A junior network administrator tells you that he can ping a DNS server successfully using its IP address, but he has not tested
    11·1 answer
  • ) Write a program to calculate the time to run 5 miles, 10 miles, half marathon, and full marathon if you can run at a constant
    12·1 answer
  • A restaurant recorded the ages of customers on two separate days. You are going to write a program to compare the number of cust
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!