1. 程式人生 > >實驗1 C語言開發環境使用和數據類型、運算符、和表達式

實驗1 C語言開發環境使用和數據類型、運算符、和表達式

環境 類型 rod 表達式 和數 scanf scan ima include

/*求兩個整數的乘積*/ 
#include <stdio.h>
int product (int,int);
int main(void)
{int x,y,s;
 scanf("%d%d",&x,&y);
 s=product(x,y);
 printf("The mul is:%d",s);
 return 0; 
 } 
 int product(int a,int b)
 {int mul;
 mul=a*b;
 return mul;
 }

技術分享圖片

實驗1 C語言開發環境使用和數據類型、運算符、和表達式