Forums Programming Assignment Help How is computer programming related to algebra

This topic contains 1 reply, has 2 voices, and was last updated by  kingsly 6 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15370

    Tyler
    Participant

    How is computer programming related to algebra?

    #15376

    kingsly
    Participant

    Answer: In Computer Programming the variables can pass on values or accept values and give the result and in algebra we solve for variables like x and y in their simplest form.
    For example: Find the area of a square with side ‘a’ units.
    In algebra: Area=a2.
    In Programming, the program can find the area by taking input from the user.
    area=a*a;
    cout<<“The area is “<<area;
    float area,a;
    cout<<“Enter length of side”;
    cin>>a;

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.