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
11Alexandr11 [23.1K]
3 years ago
5

Question 1:

Computers and Technology
1 answer:
Julli [10]3 years ago
3 0

Answer:

Following are the code to the given question:

#include<iostream>//header file

#include<math.h>//header file

using namespace std;

int main()//main method

{

   long long x, x1, y, y1;//defining long variable

   int count=0,i,j;//defining integer variable

   cout<<"Enter a range for x coordinates: "<<endl;//print message        

   cin>>x>>x1;//input x and x1 value                          

   cout<<"Enter a range for y coordinates: "<<endl;//print message

   cin>>y>>y1; //input y and y1 value  

   for(i = x; i <= -x1; i++)//use nested loop that tests each coordinates                                        

   {

       for(j = y; j <= y1; j++)//use nested loop that tests each coordinates

       {

           if(((2*pow(i,2)) + abs(2*i*j) + pow(j,2)) == 10000)//use if that checks condition as per the given question

           {

               cout<<"There is a planet at "<<i<<", "<<j<<endl;//  print coordinates

               count++;//incrementing count variable value                                                    

           }

       }

   }

   cout<<"Total number of planets detected are: "<<count<<endl;//print count value

   return 0;

}

Explanation:

In this code, inside the main method long "x, x1, y, and y1" and integer "count, i, and j" type variable is declared that uses a long variable to input value from the user-end.

In the next step, two nested loops have defined that test each coordinate and define if block that checks condition as per the given question and use i, j, and count variable to print value with the message.

You might be interested in
BIE, but plz help me on this ASAP!!! GIVING A BRAINLIEST... For this activity, imagine that you have been asked to teach a frien
WITCHER [35]

Answer:

DM me I have an answer set up but it won't let me here because it's "too long" hope to here back from you! (sorry about this Brainly has been acting up on me lately!!!!!)

Explanation:

3 0
3 years ago
What is the term for an e-mail server program that receives sent messages and delivers them to their proper destination?
Katarina [22]
MTA (Mail Transfer Agent)
6 0
3 years ago
Write a program to calculate the
marishachu [46]

Answer:

blep blep blep belp belp belp belp belp belp BELPPPPPPPPPP

5 0
3 years ago
In excel, an anchor($) allows you to?
mina [271]
Sssa rinmmy sihoa ihu hji ishoa io>?
6 0
3 years ago
12. What was the trade Howard offered to Death?​
Pachacha [2.7K]

Answer:

His life

Explanation:

5 0
2 years ago
Other questions:
  • Kyra needs help planning what images and text to use in her web page what technique can help her
    5·2 answers
  • Many computer magazines and Web sites present comparisons of several DBMSs. Find one such DBMS comparison article and compare th
    10·1 answer
  • sqrt is being defined as a variable name, how do I get its math function to... well... function? (Python)
    11·1 answer
  • The
    6·2 answers
  • Which of the following statements are true of software engineers? Check all of the boxes that apply. They are responsible for wr
    11·2 answers
  • What is lasso tool write the name of any modelling and animation software<br>​
    8·1 answer
  • ```{r}
    11·1 answer
  • How do you copy a file​
    9·1 answer
  • G i r l s o n l y j o i n <br> id= ons jcuv jke
    13·2 answers
  • Which of the following is not considered essential for an electronic device to be called a computer?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!