Integer sequence: Difference between revisions
Content added Content deleted
(→{{header|C++}}: include cstdint, use uint32_t.) |
(→{{header|C}}: being explicitly 32-bit is silly. also a space in control structures (helps distinguish them from functions)) |
||
Line 13: | Line 13: | ||
int main() |
int main() |
||
{ |
{ |
||
unsigned int i = 0; |
|||
while(1) |
while (1) |
||
{ |
{ |
||
printf("%u\n", ++i); |
printf("%u\n", ++i); |
||
Line 28: | Line 28: | ||
int main() |
int main() |
||
{ |
{ |
||
for( |
for (unsigned int i = 1; 1; i++) |
||
printf("%u\n", i); |
printf("%u\n", i); |
||