Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Simple code for calculating the division of two integers in C language
Simple code for calculating the division of two integers in C language
You can refer to the following code:

# include & ltstdio.h & gt

int main(){

Double a, b;

Scanf("%lf%lf ",& a, & b);

printf("ans=%.2lf,mod=%d ",a/b,(int)a %(int)b);

Returns 0;

}

Extended data:

Hadl

Isupper () function in C language: judge whether a character is a capital letter.

C language isspace () function: judge whether a character is empty or not.

C language isprint () function: judge whether a character can be printed.

Islower () function in C language: judge whether a character is lowercase.

C language ldexp () function: returns the exponential power of the value of x multiplied by 2.

C language isalnum () function: judge whether a character is a letter or a number.

Baidu encyclopedia -c language