View difference between Paste ID: 1KiRJYda and dH1P08kh
SHOW: | | - or go back to the newest paste.
1-
#include<stdio.h>
1+
a = 10
2-
2+
x = 100
3-
int main(void)
3+
b = 0
4-
{
4+
y = int(raw_input('give a number:'))
5-
    int x,y,z;
5+
while(x>=10):
6-
    printf("Please enter a natural number from 11 to 100000000\n");
6+
    if(y/a)<10:
7-
    scanf("%d",&z);
7+
        if(b == 0):
8-
        for(x=10;z>x;x=10*x){
8+
             x = y/10
9-
            if(z/x<=10){
9+
        else:
10-
            y=z%x;
10+
             x = y/(10**b)
11-
            y=y%100;
11+
    else:
12-
            y=y/10;
12+
        a = a*10
13-
            printf("the second from last digit is %d",y);
13+
        b = b + 1
14-
            break;}
14+
print(x)