用编程求乘积
发布时间: 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;
}
热点内容