question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Numbers in C# Step 5

See original GitHub issue

Hi! Whilst doing Numbers in C#, step 5.

The question is to calculate the area of a circle.

i’ve got the following code: `double radius=2.15; double pi = Math.PI; double oppervlakte = pi * (radius * radius); Console.WriteLine(“De oppervlakte van de circel is: {0}”, oppervlakte);

when i submit this code, it gives an invalid value. Because the IDE on the web gives me as answer: De oppervlakte van de circel is: 14.5220120412188

Whilst, i submit this code in my VStudio it gives the answer: De oppervlakte van de circel is: 19,6349540849362

`

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
mairawcommented, Dec 20, 2017

No worries. Thanks for confirming @turbobaap!

1reaction
mairawcommented, Dec 20, 2017

I’m running that code in Visual Studio and I’m getting “De oppervlakte van de circel is: 14.5220120412188”

As @shrah said, I only get the 19.63… result if radius is 2.5. Can you try again to run that code in Visual Studio?

Read more comments on GitHub >

github_iconTop Results From Across the Web

C Program: Display first 10 natural numbers
Steps Code Stack Step‑1 1 int main() main i(int): ? Step‑2 1 int main() main i(int): ? Step‑3 1 int main() main i(int): ?
Read more >
Stepping Numbers
-> 23 is out of range so it is not considered as a Stepping Number (Or a neighbor of 2) The other stepping...
Read more >
An Introduction to C Programming for First-time Programmers
Step 1: Write the Source Code: Enter the following source codes using a programming text editor (such as NotePad++ for Windows or gEdit...
Read more >
To write a C Program for addition of two numbers. Algorithm
To write a C Program to find the sum of digits of given number. Algorithm: STEP 1: Start the program. STEP 2:Read the...
Read more >
Armstrong Number in C - Scaler Topics
Learn about Armstrong number in C by Scaler Topics. In this article, understand how to write ... Step 4: Repeat Steps 5 to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found