%:模运算符,或者称求余运算符,%两侧均应为整型数据,如9%4=1

/:除法运算符  9/4=2

例1:
#include <stdio.h>
main()
{ int a,b,c;
a=10;
b=20;
c=10%20;
printf("%d %d %d",a,b,c);
 
 }
 
C语言中%与/

 

 

 

相关文章: