Question

Newtons 2nd Laws: The absolute acceleration of a particle is proportional to the resultant force acting on it and is in the

*The solution needs to be in one file

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Since there are no languages specified, Let me solve this using c++.

Code:

#include <iostream>
#include<math.h>
using namespace std;


class Gravity{
    public:
    
    float f,g,m1,m2,r;
    
    Gravity()
    {
        g=6.673*pow(10,-11);
        cout<<"\n\n\nEnter the values of m1 and m2 (in KG): ";
        cin>>m1>>m2;
        cout<<"\nEnter the value of r (in m): ";
        cin>>r;
        
        cout<<"\nForce = "<<(g*m1*m2)/(r*r)<<" N ";
    }
};

int main()
{
    int forces[100],mass,n,x,fsum=0;
    
    cout<<"\nEnter number of forces: ";
    cin>>n;
    cout<<"\nEnter the values of forces (in N): ";
    for(int i=0;i<n;i++)
    {
        cin>>forces[i];
        fsum=fsum+forces[i];
    }
    
    cout<<"\nThe forces entered are: ";
    for(int i=0;i<n;i++)
    {
        cout<<forces[i]<<" N, ";
    }
    
    cout<<"\nEnter the value of mass (in KG): ";
    cin>>mass;
    
    cout<<"\nAbsolute acceleration: "<<(float)fsum/mass<<" ms^-2";
    
    
    Gravity obj;
    
    
    
    return 0;
}

Output:

inpu Enter number of forces: 3 Enter the values of forces (in N): 10 15 30 The forces entered are: 10 N, 15 N, 30 N, Enter th

1595208413677_image.png

Add a comment
Know the answer?
Add Answer to:
*The solution needs to be in one file Newton's 2nd Laws: The absolute acceleration of a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Q3)  A day has 86,400 secs (24*60*60). Given a number in the range 1 to 86,400, output...

    Q3)  A day has 86,400 secs (24*60*60). Given a number in the range 1 to 86,400, output the current time as hours, minutes, and seconds with a 24-hour clock. For example:70,000 sec is 19 hours, 26 minutes, and 40 seconds. Q4) Consider a triangle with sides of length 3, 7, and 9. The law of cosines states that given three sides of a triangle (a, b, and c) and the angle C between sides a and b: c square = a...

  • For this program you will build a modular equation evaluator (you may want to start from...

    For this program you will build a modular equation evaluator (you may want to start from your solution to programming assignment 1). Once again, you will write a C program that evaluates the equations provided below. The program must prompt the user for inputs for the equations and evaluate them based on the inputs. All equations should be placed into a single .c file. This means you should NOT have 7 Visual Studio projects or 7 .c files. All variables...

  • Use program control statements in the following exercises: Question 1 . Write pseudocode for the following:...

    Use program control statements in the following exercises: Question 1 . Write pseudocode for the following: • Input a time in seconds. • Convert this time to hours, minutes, and seconds and print the result as shown in the following example: 2 300 seconds converts to 0 hours, 38 minutes, 20 seconds. Question 2. The voting for a company chairperson is recorded by entering the numbers 1 to 5 at the keyboard, depending on which of the five candidates secured...

  • Activity: Writing Classes Page 1 of 10 Terminology attribute / state behavior class method header class...

    Activity: Writing Classes Page 1 of 10 Terminology attribute / state behavior class method header class header instance variable UML class diagram encapsulation client visibility (or access) modifier accessor method mutator method calling method method declaration method invocation return statement parameters constructor Goals By the end of this activity you should be able to do the following: > Create a class with methods that accept parameters and return a value Understand the constructor and the toString method of a class...

  • The file containing the JAVA files, pseudocode file and doc file that have written for this...

    The file containing the JAVA files, pseudocode file and doc file that have written for this lab. Preamble The file releasedates.txt contains a list of video games and their release dates. Each line of the file contains the release date, a tab character, and then the name. The list is currently totally unsorted. The object of today's lab is to write a series of methods that allow us to perform the following tasks: read contents from a file and store...

  • Lab 6 Instructions Objectives: • Executing and experimenting with programs that handle array related topics such...

    Lab 6 Instructions Objectives: • Executing and experimenting with programs that handle array related topics such as declaration, initialization, storing, retrieving, and processing elements. • Effectively manipulating and using ArrayList objects. • Becoming familiar with the use of arrays as method arguments and how array elements are passed to and returned from the called method. • Mastering the use of various debugging tools available on the Eclipse IDU. Important: EVERY one of the following Activities MUST be in a separate...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT