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()
{
{
uint32_t i = 0;
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(uint32_t i = 1; 1; i++)
for (unsigned int i = 1; 1; i++)
printf("%u\n", i);
printf("%u\n", i);