Compute the acceleration of gravity for a given distance from the earth's center, distCenter, assigning the result to accelGravity. The expression for the acceleration of gravity is: (G * M) / (d2), where G is the gravitational constant 6.673 x 10-11, M is the mass of the earth 5.98 x 1024 (in kg) and d is the distance in meters from the earth's center (stored in variable distCenter).
#include
using namespace std;
int main() {
double G = 6.673e-11;
double M = 5.98e24;
double accelGravity;
double distCenter;
cin >> distCenter;
/* Your solution goes here */
cout << accelGravity << endl;
return 0;
}

Answers

Answer 1

Answer:

Replace /* Your solution goes here */ with the following expression

accelGravity = (G * M) / (distCenter *distCenter );

Explanation:

Required

Complete the code

The equivalent expression of (G * M) / (d^2) is:

(G * M) / (distCenter *distCenter );

The expression must be stored in accelGravity.

So, we have:

accelGravity = (G * M) / (distCenter *distCenter );


Related Questions

what are the functions of language in logic?​

Answers

Answer:

Three basic functions of language: Informative, Expressive, and Directive Language

Informative language. Simply put, informative language can be looked at as though it is either right or wrong, or true or falseExpressive languageDirective language

explain the working principle of computer? can anyone tell​

Answers

Answer:

input process and output hehe

Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah….

a. Margin
b. View
c. LayOut
d. Paragraph

Office 92 sering disebut juga dengan….

a. Office 3.0
b. Office 7.0
c. Office Xp
d. Office 2.0


Answers

Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah

B.View

Office 92 sering disebut juga dengan

A.Office 3.0

T
N
O
?
You can insert only the row
only to
True or false

Answers

false

Explanation:

good luck bro

have a great day

Answer:

false

Explanation:

e) Point out the errors( if any) and correct them:-
class simple
{
inta,b,c;
double sumNumber
{
int d = a + b + c;
double e = d/5.6;
return e;
}
void show Number()
{
a = 10, b = 20, c=5;
System.out.println(d);
double f = sumNumber(a,b,c);
System.out.print(e);
}
}​

Answers

Explanation:

double e-d/5.6;is wrong it should return to c

What do you do if your computer dies/malfunctions? Reboot (Restart) Shut Down Recovery CD and Recover your system Call a person to fix it​

Answers

Answer:

Restart

Explanation:

Simply I may restart my pc if it dies/malfunctions. I'll not restart immediately, I'll wait for an hour and do restart my computer. If it doesn't work then maybe I'll Call a person to fix it.

Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules above. Here's a sample running of the program - note that you want to keep prompting the user until they supply you with a valid username:

Answers

user_in = input ("Please enter your username: " )

if user_in in "0123456789":

print ("Username cannot contain numbers")

elif user_in in "?":

print ("Username cannot continue special character")

else:

print (" Welcome to your ghetto, {0}! ".format(user_in))

By Using the following schema, answer the following SQL queries and commands: Product(P_code.P_name, P_price, P_on_hand,vend_code) Vender(vend_code, vend_fname, vend_areacode, vend_phone) 1- find the venders names who sell products in TN-5 area and their names include "dan". 2- find the code, name and vender code of product that has price between 1500S and 2500S and the product that has price between 48005 and 5600S. 3- Find the name, and code of venders who had 5 microwaves that has price less than 3500S. 4- Find the phone numbers of venders who sell Televisions. 5- Delete the records of venders who their first name is 'smith'

Answers

Explanation:

answer me pls i need sol bbbd

Write a program that randomly chooses among three different colors for displaying text on the screen. Use a loop to display 20 lines of text, each with a randomly chosen color. The probabilities for each color are to be as follows: white 30%, blue 10%, green 60%. Suggestion: Generate a random integer between 0 and 9. If the resulting integer falls in the range 0 to 2 (inclusive), choose white. If the integer equals to 3, choose blue. If the integer falls in the range 4 to 9 (inclusive), choose green. Test your program by running it ten times, each time observing whether the distribution of line colors appears to match the required probabilities.

Answers

INCLUDE Irvine32.inc

.data

msgIntro  byte "This is Your Name's fourth assembly extra credit program. Will randomly",0dh,0ah

        byte "choose between three different colors for displaying twenty lines of text,",0dh,0ah

        byte "each with a randomly chosen color. The color probabilities are as follows:",0dh,0ah

        byte "White=30%,Blue=10%,Green=60%.",0dh,0ah,0

msgOutput byte "Text printed with one of 3 randomly chosen colors",0

.code

main PROC

;

//Intro Message

      mov edx,OFFSET msgIntro  ;intro message into edx

      call WriteString         ;display msgIntro

      call Crlf                ;endl

      call WaitMsg             ;pause message

      call Clrscr              ;clear screen

      call Randomize           ;seed the random number generator

      mov edx, OFFSET msgOutput;line of text

      mov ecx, 20              ;counter (lines of text)

      L1:;//(Loop - Display Text 20 Times)

      call setRanColor         ;calls random color procedure

      call SetTextColor        ;calls the SetTextColor from library

      call WriteString         ;display line of text

      call Crlf                ;endl

      loop L1

exit

main ENDP

;--

setRanColor PROC

;

; Selects a color with the following probabilities:

; White = 30%, Blue = 10%, Green = 60%.

; Receives: nothing

; Returns: EAX = color chosen

;--

      mov eax, 10              ;range of random numbers (0-9)

      call RandomRange         ;EAX = Random Number

      .IF eax >= 4          ;if number is 4-9 (60%)

      mov eax, green           ;set text green

      .ELSEIF eax == 3         ;if number is 3 (10%)

      mov eax, blue            ;set text blue

      .ELSE                    ;number is 0-2 (30%)

      mov eax, white           ;set text white

      .ENDIF                   ;end statement

      ret

setRanColor ENDP

What are some 5 constraints in using multimedia in teaching​

Answers

Answer:

Explanation:

Technological resources, both hardware and software

Technological skills, for both the students and teacher

Time required to plan, design, develop, and evaluate multimedia activities

Production of multimedia is more expensive than others because it is made up of more than one medium.

Production of multimedia requires an electronic device, which may be relatively expensive.

Multimedia requires electricity to run, which adds to the cost of its use

There are constraints in using multimedia in teaching​; The Technological resources, both hardware and software Also, Technological skills, for both the students and teacher

What is a characteristic of multimedia?

A Multimedia system has four characteristics and they are use to deliver the content as well as the functionality.

The Multimedia system should be be computer controlled. The interface is interactive for their presentation and lastly the information should be in digital.

There are constraints in using multimedia in teaching​;

The Technological resources, both hardware and software

Also, Technological skills, for both the students and teacher

Since Time required to plan, design, develop, and evaluate multimedia activities

The Production of multimedia is more expensive than others because it is made up of more than one medium.

The Production of multimedia requires an electronic device, which may be relatively expensive.

The Multimedia requires electricity to run, which adds to the cost of its use.

Learn more about multimedia here;

https://brainly.com/question/9774236

#SPJ2

Code Example 17-1 class PayCalculator { private: int wages; public: PayCalculator& calculate_wages(double hours, double wages) { this->wages = hours * wages; return *this; } double get_wages() { return wages; } }; (Refer to Code Example 17-1.) What coding technique is illustrated by the following code? PayCalculator calc; double pay = calc.calculate_wages(40, 20.5).get_wages(); a. self-referencing b. function chaining c. dereferencing d. class chaining

Answers

Answer:

The answer is "Option b".

Explanation:

Function chaining is shown by this code, as the functions are called one after the other with one statement. Whenever you want to call a series of methods through an object, that technique is beneficial. Just because of that, you may give the same effect with less code and have a single given value only at top of the leash of operations.

2. Which property is used for hiding text of the textbox?
a) Password Char b) Text Char c) Char Password d) Pass Char

Answers

Answer:

password char

Explanation:

The password char property allows the text being written in the textbox to be hidden in the form of dots or stars. As such the user entering the password is secure, as no one nearby can know the password by watching the texts.

The advantage of returning a structure type from a function when compared to returning a fundamental type is that a. the function can return multiple values b. the function can return an object c. the function doesn’t need to include a return statement d. all of the above e. a and b only

Answers

Answer:

The advantage of returning a structure type from a function when compared to returning a fundamental type is that

e. a and b only.

Explanation:

One advantage of returning a structure type from a function vis-a-vis returning a fundamental type is that the function can return multiple values.  The second advantage is that the function can return can an object.  This implies that a function in a structure type can be passed from one function to another.

tinh S(n) = 1+2+3+.....+n

Answers

Answer:

-1/12

Explanation:

[tex]\sum_{k=0}^{k=n} k = \frac{n(n+1)}{2}\\[/tex]

look up the derivation by Srinivasa Ramanujan for a formal proof.

3. Using Assume the following list of keys: 36, 55, 89, 95, 65, 75, 13, 62, 86, 9, 23, 74, 2, 100, 98 This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the middle element of the list. a. Give the resulting list after one call to the function partition. b. What is the size of the list that the function partition partitioned

Answers

Answer:

a. 36, 55, 13, 9, 23, 2, 62, 86, 95, 65,74, 75, 100, 98, 89

b. 15

Explanation:

How to use the AI System ?

Answers

ANSWER:

· New artificial intelligence systems are being developed to help teachers administer more effective testing that could uncover some of these often-hidden conditions. Once they can be properly identified, educators can tap into the resources available for a learning disability. Students can use AI to give reliable feedback.

What is system software? Write its types.​

Answers

Answer:

There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)

Answer:

There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)

Explanation:

thanks for question

Neymar machine that Run on electricity

Answers

"Neymar" = "name a"?

if so, well, there are many, like the little glowing box you use the type questions to the brainliest community, let it be a phone, a pc, or a molded Nintendo

if you meant Neymar indeed, I'm not sure if he runs on electricity, unless he is a soccer playing android somehow.

If every company is now a technology company, then what does this mean for every student attending a business college

Answers

Answer:

Explanation:

There are all sorts of possibilities for, say, inserting new technologies into existing processes. But most of these improvements are incremental. They are worth doing; in fact, they may be necessary for survival. No self-respecting airline, for instance, could do without an application that lets you download your boarding pass to your mobile telephone. It saves paper, can't get lost and customers want it.

But while it's essential to offer applications like the electronic boarding pass, those will not distinguish a company. Electronic boarding passes have already been replicated by nearly every airline. In fact, we've already forgotten who was first.

Write a recursive function named is_decreasing that takes as its parameter a list of numbers. It should return True if the elements of the list are strictly decreasing (each element in the array is strictly less than the previous one), but return False otherwise.

Answers

Answer:

c

Explanation:

An engineer is configuring AMP for endpoints and wants to block certain files from executing. Which outbreak control method is used to accomplish this task

Answers

Question Completion with Options:

A. device flow correlation

B. simple detections

C. application blocking list

D. advanced custom detections

Answer:

The outbreak control method that is used to accomplish the task of configuring AMP for endpoints and to block certain files from executing is:

C. application blocking list

Explanation:

The application blocking list creates a list of application files, which the AMP continuously tracks and analyzes to compare the file activities with previous cyber attacks.  Specifically, the AMP for Endpoints is a cloud-managed endpoint security solution, which provides a retrospective alert to prevent cyber-security threats, and rapidly detects, contains, and remediates malicious files on the endpoints.

continuously tracks and analyzes files and file activities across your systems, and compares these events to what preceded or happened in past attacks. If a file exhibits malicious behavior, the AMP provides you with a retrospective alert which enables you to stop a potential threat from succeeding.

How do i connect WiFi on windows xp without icon?

Answers

Right click anywhere on your taskbar, and then click Properties. Step 2: Find and click the Notification Area tab on the top bar, and then find the section labeled with System icons, check the checkbox for Network. Last, click OK to finish it.

Answer:

Right click anywhere on your taskbar, and then click Properties. Step 2: Find and click the Notification Area tab on the top bar, and then find the section labeled with System icons, check the checkbox for Network. Last, click OK to finish it.

cho dãy số a[] có n phần tử và dãy số b[]cõ m phần tử là các các số nguyên dương nhỏ hơn 1000 . Gọi tập hợp A là tập các số khác nhau trong a[], tập hợp B là các số khác nhau trong b[]

Answers

Answer:

please translate

Thank you✌️

You are going to purchase (2) items from an online store.
If you spend $100 or more, you will get a 10% discount on your total purchase.
If you spend between $50 and $100, you will get a 5% discount on your total purchase.
If you spend less than $50, you will get no discount.
Givens:
Cost of First Item (in $)
Cost of Second Item (in $)
Result To Print Out:
"Your total purchase is $X." or "Your total purchase is $X, which includes your X% discount."

Answers

Answer:

Code:-

using System;

using System.Collections.Generic;

class MainClass {

public static void Main (string[] args) {

int Val1,Val2,total;

string input;

double overall;

Console.Write("Cost of First Item (in $)");

      input = Console.ReadLine();

Val1 = Convert.ToInt32(input);

Console.Write("Cost of Second Item (in $)");

      input = Console.ReadLine();

Val2 = Convert.ToInt32(input);

total=Val1+Val2;

if (total >= 100)

{

overall=.9*total;

Console.WriteLine("Your total purchase is $"+overall);

}

else if (total >= 50 & total < 100)

{

overall=.95*total;

Console.WriteLine("Your total purchase is $"+overall);

}  

else

{

Console.WriteLine("Your total purchase is $"+total);

}  

}

}

Output:

How many cost units are spent in the entire process of performing 40 consecutive append operations on an empty array which starts out at capacity 5, assuming that the array will grow by a constant 2 spaces each time a new item is added to an already full dynamic array

Answers

Answer:

Explanation:

260 cost units, Big O(n) complexity for a push

The Janitorial and Cafeteria departments are support departments. Samoa uses the sequential method to allocate support department costs, first allocating the costs from the Janitorial Department to the Cafeteria, Cutting, and Assembly departments. Determine the proportional (percentage) usage of the Janitorial Department by the:

Answers

Complete Question:

Departmental information for the four departments at Samoa Industries is provided below. Total Cost Cost Driver Square Feet Number of employees Janitorial $150,000 square footage serviced 200 Cafeteria 50,000 Number of employees 20,000 Cutting 1,125,000 4,000 120 Assembly 1,100,000 16,000 The Janitorial and Cafeteria departments are support departments Samoa uses the sequential method to allocate support department costs, first allocating the costs Department to the Cafeteria, Cutting and Assembly departments Determine the proportional (percentage) usage of the Janitorial Department by the a. Cafeteria Department b. Cutting Department c. Assembly Department

Answer:

Samoa Industries

Proportional (percentage) usage of the Janitorial Department:

Cafeteria = 50%

Cutting = 10%

Assembly = 40%

Explanation:

a) Data and Calculations:

                 Total Cost         Cost Driver             Square Feet       Number of

                                                                                                    employees

Janitorial   $150,000 Square footage serviced          200                40

Cafeteria      50,000 Number of employees        20,000                 12

Cutting     1,125,000                                                 4,000               120

Assembly 1,100,000                                               16,000                 40

Proportional (percentage) usage of the Janitorial Department:

Cafeteria = 50% (20,000/40,000 * 100)

Cutting = 10% (4,000/40,000 * 100)

Assembly = 40% (16,000/40,000 * 100)

Cost Allocation of the Janitorial Department:

Cafeteria = 50% * $150,000 = $75,000

Cutting = 10% * $150,000 =        15,000

Assembly = 40,% * $150,000 = 60,000

Total =                                    $150,000

Which support function under Tech Mahindra is governing data privacy and protection related requirements

Answers

Answer:

Privacy Policy

Explanation:

PRIVACY POLICY is the support function under Tech Mahindra that is governing data privacy and protection-related requirements.

Given that support functions are functions which assist and in a way contribute to the company goal.

Other support functions are human resources, training and development, salaries, IT, auditing, marketing, legal, accounting/credit control, and communications.

The above statement is based on the fact that the Privacy Policy clarifies all the data protection rights, such as the right to object to some of the production processes that TechM may carry out.

Explain how you would find a book on a given subject in the library.

Answers

Answer:

In case I am looking for a specific book in a library, the way in which I would try to find it would be through consulting the library guide, or through inspection of the different books of the specific sector with which the book I'm looking for is listed, or by asking the library staff to help me with my search.

Suppose you have some List of S List of Strings called List and a String prefix. Write a method that removes all the Strings from list that begin with prefix. public void removePrefixStrings(List-String- list, String prefix) 7. What is the time complexity of this algorithm?

Answers

Answer:

public void removePrefixStrings(List<String> list , String prefix) {

if(list==null || list.size()==0)

return;

for(int i=0; i<list.size();) {

if(list.get(i).startsWith(prefix))

list.remove(i);

else

++i;  

}  

}  

Time Complexity: If the prefix is the same as String length, Then finding all prefix match will take n *n = n2

Then removal is also n  

So the total time complexity is O(n3)

Prime numbers can be generated by an algorithm known as the Sieve of Eratosthenes. The algorithm for this procedure is presented here. Write a program called primes.js that implements this algorithm. Have the program find and display all the prime numbers up to n = 150

Answers

Answer:

Explanation:

The following code is written in Javascript and is a function called primes that takes in a single parameter as an int variable named n. An array is created and looped through checking which one is prime. If So it, changes the value to true, otherwise it changes it to false. Then it creates another array that loops through the boolArray and grabs the actual numberical value of all the prime numbers. A test case for n=150 is created and the output can be seen in the image below highlighted in red.

function primes(n) {

   //Boolean Array to check which numbers from 1 to n are prime

   const boolArr = new Array(n + 1);

   boolArr.fill(true);

   boolArr[0] = boolArr[1] = false;

   for (let i = 2; i <= Math.sqrt(n); i++) {

      for (let j = 2; i * j <= n; j++) {

          boolArr[i * j] = false;

      }

   }

   //New Array for Only the Prime Numbers

   const primeNums = new Array();

  for (let x = 0; x <= boolArr.length; x++) {

       if (boolArr[x] === true) {

           primeNums.push(x);

       }

  }

  return primeNums;

}

alert(primes(150));

Other Questions
Click the photo to solve the photo What happens if cocoon is not boiled? Teenagers sitting in a cafe in [Melbourne city of Australia.] Which of the following is the last step in creating a budget. Determine savings r debt. Identifying variable expenses. Identify income r identify fixed expenses which one the answer what is the value of the smallest of five consecutive integers if the least minus twice the greates equals -3A. -9B. -5C. -3D. 5 identify words with positive and negative connotationinformationnewsdetailsgossip (please help me ) John White led the group of settlers in 1587. He brought his daughter with him to America. His daughter gave birth to the first English baby born in America. What was the baby's name? PLS TRANSLATE THIS IN SINDHIAbd Allah (or Abdullah) was born on Sunday night, 5th Safar, 1044 AH (1634 CE) in al-Subayr, a village on the outskirts of Tarim in Hadramawt. His father was Alawi bin Muhammad al-Haddad, a pious man of taqwa, from the people of Allah. Imam al-Haddad's paternal grandmother, Salma, was also known to be a woman of gnosis and sainthood. His mother was Salma bint Aidrus bin Ahmad al-Habshi. His maternal great-grandfather, Ahmad al-Habshi, met Imam al-Haddad's father, prior to Imam al-Haddad's father knowing Imam al-Haddad's mother and he said to Imam al-Haddad's father "Your children are my children, and there is a blessing in them". As a Sayyid, his sanctity and direct experience of God are clearly reflected in his writings, which include several books, a collection of Sufi letters, and a volume of mystical poetry. Please help asap! I will mark you brainliest. Write one sentence in Spanish to show him where to stop. Remember:Use one affirmative t (informal) command.Use parar. Draw a formula for Thr-Gly-Ala (T-G-A) in its predominant ionic form at pH 7.3. You may assume for the purposes of this question that the pKa values of the acidic groups of amino acid residues in the peptide are the same as in the amino acid itself. 1. A researcher is investigating the effects of exercise on weight. What are the independent and dependent variables in this experiment?A)The dependent variable is the amount of exercise; the independent variable is the number of calories consumed.B)The dependent variable is weight; the independent variable is exercise.C)The independent variable is weight; the dependent variable is the number of calories consumed.D)The independent variable is the number of calories consumed; the dependent variable is diet. here is another question i need help Pearl Harbor was caused by all of the following events EXCEPT:AJapan taking over China (Manchuria).BJapan's alliance with Germany.The U.S. cutting off oil and scrap metal.DJapan's alliance with Russia Find the missing length the triangles are similar. Two sides of a right triangle measure 5 inches and 6 nches, and the third side measures 61 inches.The length of the third side is about inches _ . The perimeter of the triangle is about inches. __ [tex]\frac{3}{2x}[/tex]-[tex]\frac{11}{5}[/tex]=[tex]\frac{7}{8}[/tex].[tex]\frac{64}{49}[/tex] guys pls tell me this answer as soon as possible please help solve for y! a word problem on proportions using a unit rateLashonda made $273 for 13 hours of work.At the same rate, how many hours would she have to work to make $231?hours? How many unit cubes are on each layer of the cube?63129