給定程式modi1 c中函式fun的功能是 根據輸入的

時間 2022-04-13 05:28:16

1樓:yeara洛

如果其他地方是你打錯的話,就將void fun(int a,int b,int c)改為int fun(int a,int b,int c)就可以了。

#include

#include

int fun(int a,int b,int c)else return 0;

}main()

2樓:汪好帥

void fun(int a,int b,int c)上面這句改成int fun(int a,int b,int c)

/************found************/else retrun 1

這句lz如果不是抄錯的話應該改成

else return 1;

3樓:匿名使用者

#include

#include

/************found************/int fun(int a,int b,int c)else

return 0;

}void main()

給定程式modi1.c中函式 fun 的功能是:

4樓:聽不清啊

/**********found**********/

void fun(char *str,char ch)

} main( )

5樓:匿名使用者

該函式編寫有幾個明顯錯誤,但是他的目的是:

在字串str中找到字元 ch,並在第乙個ch出現的位置之後,寫入結束符 『\0』,結束該字串。

即把ch第一次出現的位置作為字串最後乙個字元

c語言程式修改題給定程式modi1.c中函式fun的功能是:

6樓:匿名使用者

1、fun(int n, int *p)是有兩個引數,第二個引數是個指標,可以用於傳遞返回值。

2、這個函式是乙個遞迴函式,當n=1或2的時候,返回的是1,否則遞迴執行。初始n=6,這裡假定把通過s返回的值作為函式的返回值。相當於下面的運算。

f(6,s)

=f(5,s) +f(4,s)

=f(4,s) +f(3,s) +f(3,s) +f(2,s)=f(3,s)+ f(2,s)+f(2,s)+f(1,s)+f(2,s)+f(1,s)+1

=f(2,s)+f(1,s)+1 +1 +1 +1 +1 +1=1 +1 +6=8

7樓:匿名使用者

int fun()}}

return sum;}

8樓:牛牛牛不牛

你這樣的意思就是 紅球可以沒有了(i=0開始迴圈)

、給定程式modi1.c中函式fun的功能是:按以下遞迴公式求函式值。

9樓:

讓你改錯的啊,double那一行是錯誤的要修改

int fun(int n)

給定程式modi1.c中函式fun的功能是,根據整型形參m。。。。如下圖

10樓:匿名使用者

#include 「stdio.h」

float fun()

return s;}

【急】c++程式改錯:給定程式mod1.c中函式fun的功能是:

11樓:戰國無敵

有錯的地方寫成了/********yes**********/ 改的地方已寫好了注釋

是只有右上角與左下角吧,,,,???

#include //這行你應該是漏了吧,#include

#include

/******yes*****/

double fun(double a,double b)//需增添乙個double

main()