Numbers in C# Step 5
See original GitHub issueHi! 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:
- Created 6 years ago
- Comments:6
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No worries. Thanks for confirming @turbobaap!
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?