0
Comments
  • 8
    We're not a homework help site.
  • 8
    @SortOfTested And nobody wants future co-workers who simply aren't able to code. Let such students fail hard.
  • 6
    Place a billions of random points inside a smallest possible square where your circle is fitted. Now for every point you have a flag like does it happen to be inside a circle or outside. You can easily calculate the area from there, good luck lol
  • 1
  • 0
    https://mathsisfun.com/sine-cosine-...

    IDK if this is the right approach, but that's how I would do it lol.
  • 3
    Well I tried it out, and my circle is fucking ugly
  • 1
    Here is the code for the ugly af circle. https://github.com/bitglitcher/...
  • 3
    I'm with @Fast-nop on this one.

    @Farah, do you know how to calculate the area of a circle from a mathematical standpoint?
  • 3
    Folks, I think @farah is tryna say that calculating area of a circle in C++ is the best team win they had. It's tagged with weekly question. No need to get offensive lol.
  • 0
    @farah also, welcome to dR!
  • 2
    Bruh.. fuck fuck fuck fuck fuck I though the rant said "How draw cicle by C". How the fuck, it's not even similar. 🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️
    omg, that's it. I need some sleep.
  • -1
    C++ code required for this plz
  • 0
  • 0
  • 3
    @Farah sorry, but you've misunderstood the platform. This is not for asking questions that could easily be solved with a quick Google search.
  • 2
    @farah you've gotten tags wrong.
  • 3
    @Farah Tasks like this are designed to give you an intro to a language you don't yet know by having you deal with a simple enough problem. If you fail here, you're going to have a really bad time onwards.
  • 1
    Theoretically you can’t measure area of circle. You can only approximate it right now.
    Because error rate is so small we tell people we can do it but in fact we’re not able to calculate it without using constraint that was brought by ancient Egyptians on papyrus.
  • 1
    @raspark lmao you even gave him the benefit of the doubt
  • 0
    @vane Wait why can't we?
  • 1
    @12bitfloat because "π" is irrational number
  • 0
    @vane So we can measure the area of a circle if we move the irrationality to the radius in the right way.
  • 1
    @Fast-Nop you can’t measure but only approximate. Same as square root of 2. We get that for granted but it’s limitation of number system we’re using. There are at least two paradoxes around circle/sphere so I believe our math is fundamentally broken but nobody gives a shit. Bertrand or Banach-Tarski paradox.

    Same as most of us think earth is round but get for granted that we live in Euclidean geometry. But in fact we live in spherical one lol
  • 0
    @vane Let r=1/sqrt(pi). Then a=pi*r^2=1, which is a rational number. Sure, then we can't measure the radius, but your statement was only about the area.
  • 0
    @Fast-Nop ok so what is pi then ? How much it is exactly ? For me it’s real number with infinite precision. Based on that we can have infinite number of solutions that are limited by precision of PI
  • 1
    @Fast-Nop I go further you can say I’m stupid cause you can take and measure circle in real life but it’s illusion cause your measure have precision and also meter definition is based on vacuum speed of light and as we know speed of light is constraint that is approximated.
  • 2
    @vane Given the Planck time as minimum time quantum, that translates into length not actually being a continuous variable, but a discrete one, albeit with extremely high resolution. This means that we ultimately cannot even measure the radius itself anyway.
  • 3
    Have you tried the following ?

    let a = Math.areaCircle(r);
    let c = a - 1;
    return c++; // since c++ is required
Add Comment