mattsan #7145(2008/08/17 04:33 GMT) [ C++ ] Rating0/0=0.00
ちょっと不格好かなぁ…。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include <iostream> void count(int n) { int d = 1; int i = 0; while(i <= n) { std::cout << i << std::endl; i += d; if((i / (d * 10) > 0)) { d *= 10; } } } int main(int, char* []) { count(300); return 0; }
Rating0/0=0.00-0+
1 reply [ reply ]
mattsan
#7145()
[
C++
]
Rating0/0=0.00
ちょっと不格好かなぁ…。
Rating0/0=0.00-0+
1 reply [ reply ]