1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream.h> int Chislo(int ch, int pos) { int i, div = 1; for(i = 1; i < pos; ++i) div *= 10; return (ch/div) % 10; } int main() { int i; for(i = 1; i < 11; ++i) std::cout<<Chislo(1234567890, i); return 0; }
1
0987654321