← 返回列表

计算机编程数学运算符

计算机编程数学运算符 #include <stdio.h> int main() { int a, b, c; a = 10; b = 20; c = a + b; printf( "Value of c = %d\n", c); c = a - b; printf( "Value of c = %d\n", c); c = a * b; printf( "Value of c = %d\n", c); c = b / a; printf( "Value of c = %d\n", c); c = b % a; printf( "Value of c = %d\n", c); }

计算机编程数学运算符

#include <stdio.h>



int main() {



   int a, b, c;



   a = 10;

   b = 20;



   c = a + b;   

   printf( "Value of c = %d\n", c);



   c = a - b;   

   printf( "Value of c = %d\n", c);



   c = a * b;   

   printf( "Value of c = %d\n", c);



   c = b / a;   

   printf( "Value of c = %d\n", c);



   c = b % a;   

   printf( "Value of c = %d\n", c);

}

打开资源 ↗

交流与评论