Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - After 1 of 7 is converted into decimal, what is the number of the nth place after the decimal point? Please program in C language, thank you! !
After 1 of 7 is converted into decimal, what is the number of the nth place after the decimal point? Please program in C language, thank you! !
# include & ltstdio.h & gt

void main()

{

Double num, divided into mu;

int i,n,flag

Long k;

Printf ("Please enter denominator:");

Scanf("%lf ",& split wood);

Num = double( 1.0/ mu);

printf("%lf\n ",num);

Printf ("Please enter the number of digits to view: n =");

scanf("%d ",& ampn);

for(I = 1; I < = n; i++)

num = num * 10;

K = num// becomes plastic.

flag = k % 10; //Take the remainder and extract the required number.

printf("flag=%ld\n ",flag);

}