Header Ads

Learn Together, Stay Connected.

সংখ্যার নির্দিষ্ট অংক-C


#include<stdio.h>
#include<math.h>

int main()
{
int N,X,temp,rem,ara[20],i=1;
scanf("%d %d",&X,&N);
temp=X;
while(temp!=0)
{
ara[i]=temp%10;
temp=temp/10;
i++;
}
printf("%d\n",ara[N]);
return 0;
}

No comments

Theme images by Dizzo. Powered by Blogger.