Which digit? A separate unconditional integer i is loving. Write a program to confront the digit located in collocation i in the subjoined infinite posteriority of digits created by juxtaposing the increasing larger posterioritys of incremented integers 1, 2, 3, …. Ce sample, the leading 80 digits of the posteriority are as follows: 11212312341234512345612345671234567812345678912345678910123456789101112345678910 The leading thread of the input (stdin/keyboard) contains a separate integer n (1 lessthanorequalto n lessthanorequalto 100), the enumerate of proof instances, followed by undivided thread ce each proof instance. The thread ce a proof instance contains the separate integer i (1 lessthanorequalto i
in this program we accept devide drifts in complete steps by using func(n) function;
#include<stdio.h>
int func(int n){
int p=1;
while(n>=(p*(p+1)/2)){
p++;
}
–p;
if(n==(p*(p+1)/2)){
return p;
}
else{
return n-(p*(p+1)/2);
}
}
int ocean(void){
int t,n;
scanf(“%d”,&t);
while(t){
scanf(“%d”,&n);
printf(“%dn”,func(n));
t–;
}
return 0;
}
//output is loving in metaphor adown.