By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,194 Members | 829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,194 IT Pros & Developers. It's quick & easy.

floating point

P: 12
How do i declare a constant floating point variable with a value of 3.1416 ?
Mar 22 '07 #1
Share this Question
Share on Google+
2 Replies


Roonie
P: 99
Expand|Select|Wrap|Line Numbers
  1. const float var_name = 3.1416;
Mar 22 '07 #2

Ganon11
Expert 2.5K+
P: 3,652
Specifically (since this looks like you are defining pi),

Expand|Select|Wrap|Line Numbers
  1. const float PI = 3.1416;
Mar 22 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.