错误:宏“pow”传递3个参数,但只需2个 [英] error: macro "pow" passed 3 arguments, but takes just 2
问题描述
大家好,我的程序有问题。它应该取两个数字并加注到另一个,但当我尝试编译程序时,我得到。
函数'power':
错误:宏" POW"通过3个参数,但只需要2
感谢您给予的任何帮助。
#include< stdio.h>
#include< tgmath.h>
int main(无效)
{
int x,n;
printf(" ;插入号码:");
scanf("%d"& x);
printf("插入号码将前一个号码提升为:" ;);
scanf("%d"& n);
int power(a10)
{
printf(" Value%d ^%d =%f",pow(x,n,));
}
}
取消备用逗号:
printf( 值%d ^%d =%f,pow(x,n,));
^
|
成为:
printf( Value%d ^%d =%f,pow(x,n));
hello everyone I'm having problems with my program. It is supposed to take two numbers and raise on to the other, but when I try to compile the program I get.
In function 'power':
error: macro "pow" passed 3 arguments, but takes just 2
thanks for any help given.
#include <stdio.h>
#include <tgmath.h>
int main(void)
{
int x,n;
printf("insert number: ");
scanf("%d",&x);
printf("insert number to raise previous number to: ");
scanf("%d",&n);
int power(a10)
{
printf("Value %d ^ %d = %f", pow(x, n,));
}
}
Take off the spare comma:
printf("Value %d ^ %d = %f", pow(x, n,)); ^ |
Becomes:
printf("Value %d ^ %d = %f", pow(x, n));
这篇关于错误:宏“pow”传递3个参数,但只需2个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!