用編程求乘積
發布時間: 2024-06-12 11:22:39
⑴ C璇璦緙栫▼棰:涓や釜鏁頒箻縐鐨勫嚱鏁
鍒嗙被: 鐢佃剳/緗戠粶 >> 紼嬪簭璁捐 >> 鍏朵粬緙栫▼璇璦
闂棰樻弿榪:
奼備袱涓鏁扮殑涔樼Н鐨勫嚱鏁(涓誨嚱鏁拌皟鐢),絳旀堝笇鏈涘悇浣嶉珮鎵嬭兘澶熺粰璇︾粏浜,璋㈣阿浜
瑙f瀽:
double Multipy(double a, double b)
{
return a * b;
}
int main()
{
double a, b;
printf("Please Enter o data");
scanf("%lf %lf", &a, &b);
printf("The value : %lf", Multipy(a, b));
return 0;
}
⑵ 編寫一個求兩個整數乘積的c語言程序
#include<stdio.h>
intmain(void)
{
intx,y;
printf("請輸入數字,空格分割 ");
scanf("%d%d",&x,&y);
printf("結果是%d ",x*y);
return0;
}
熱點內容