There's no console output for some reason (double and float data types C#)? -


namespace floatandouble  { class program  {     static void main string[] args)      {          float floatpi = 3.141592653589793238f;         double doublepi = 3.141592653589793238;          console.writeline("float pi is: " + floatpi);         console.writeline("double pi is: " + doublepi);     }        console.readline();    }   } 

i'm trying work on basics (real floating point types) c# i'm new language. i'm pretty sure code correct, however, there many errors. appreciated!

the prroblem code has putting console.readline() inside class, should put inside main function.

namespace consoleapplication5 {     public class program     {         static void main(string[] args)         {             float floatpi = 3.141592653589793238f;             double doublepi = 3.141592653589793238;              console.writeline("float pi is: " + floatpi);             console.writeline("double pi is: " + doublepi);              console.readline();         }     } } 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -