0
Getting So many errors !!
3 Respostas
+ 3
That's because the compiler doesn't recognize the sign for PI like we humans do. For the compiler, it's just a sign that it doesn't know and cannot work with.
Instead, try to declare a constant variable PI, either per #define or const, and to use that in your code.
+ 1
If you copy+pasted this code from a place it worked, that place probably had:
* Visual Studio, or...
* a preprocessor in PERL
* a patched compiler (SOURCE_CHARSET is changed to "C99" in one place)
As indicated in this reference:
https://stackoverflow.com/questions/7899795/is-it-possible-to-get-gcc-to-compile-utf-8-with-bom-source-files
The code does compile with the UCN identifier for π (because -fextended-identifiers is a default flag):
float radius, ..., \U000003C0;
but as far as I know, there's no "helper" here so you can just use utf8 identifiers in your codes.
So... Shadow's response is correct here for SoloLearn.
0
still getting error ??
https://code.sololearn.com/c6qx2wf6K4Au/?ref=app