| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Squares |
> Wouldn't you rather write:
> for (n = 0; n < sqrt(INT_MAX); n++)
> Otherwise, you would start getting negative numbers
> after a bit.
Fair enough, but I would rather not evaluate sqrt(INT_MAX) each time
through the loop, so for the price of one more stacked identifier - const
int top:-
#include
#include
int main(void)
{ int n;
const int top=(int)sqrt(INT_MAX);
for(n = 0; n |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.