求高手解答一些簡單的C語言題目!(高分懸賞)

2021-03-11 01:43:18 字數 1857 閱讀 7503

1樓:匿名使用者

1、before globalplusplus(), it is 1before ++, it is 1

after ++, it is 2

after globalplusplus(), it is 22、over!

3、(1)

printf("input a year:");

scanf("%d",&year);

(2)(0==year%4 && 0!=year%100) || 0==year%400

4、(1)

s[i]!='\0'

(2)s[j]=s[i];

5、#include

main()

else

}printf("\n");}}

6、#include

main()

printf("1~100的累加和為:%ld\n",sum);

} 7、

#include

void getmaxmin(float s)if(s[max]

main()

printf("\n");}}

9、#include

#include

#define true 1

#define faulse 0

/*isprime 的返回值為0,n不是素數;返回值為1,n是素數。*/

int isprime(int n)

if(0==n%2)

for(i=3;i<=sqrt(n);i+=2)else if(i>sqrt(n)) }}void main()

while(number<2);

if(isprime(number))

printf("%d是一個素數!\n",number);

else printf("%d不是一個素數!\n",number);

} 10、

#include

long fac(int n)

void main()

while(m<0);

dowhile(k<0);

printf("%ld\n",fac(k)/fac(m-k));

} 11、

#include

void main()

printf("英語字元:%d\n",letter);

printf("數字字元:%d\n",integer);

printf("空格字元:%d\n",space);

printf("其他字元:%d\n",other);}

2樓:高金山

確實都是些很簡單的題目,最好還是自己先動手寫寫吧。

3樓:匿名使用者

我很懶..都是些很簡單很簡單的c語言題目..還是自己努力下,這東西自己不動手做,永遠都摸索不出來

幾道簡單的線性代數題,高分懸賞,求高手解答

4樓:匿名使用者

^針對:3b^2-6b^(-1)+3e,

因b的特徵值為1,-1,2.

則3b^2的特徵值為:3*(-1)^2,3*1^2,3*2^2.

即: 3,3,12

6b^(-1)的特徵值為:6*1/(-1),6*1/1,6*1/2,即:-6,6,3

3e的特徵值為:3*1,3*1,3*1,即:

3,3,3

所以3b^2-6b^(-1)+3e的特徵值為3+6+3,3-6+3,12-3+3

即:12,0,12

所以行列式為0。

根據求特徵值的定義

|λe-a|=0

由題意的對比可知。

λ1=1,λ2=-2,λ3=-5/2

c語言的題,求高手解答,求高手解答一下C語言題

同學,你好,你的程式中有錯誤 程式的前面幫你修改了一下,但是在 p1 w 處,不知道你是怎麼抄的沒有一個w的變數 修改正確後在發來 吧 include include void fun char int m int main c語言的題,求高手解答 結果應該是721 先看main函式,i 1時,i ...

C語言題目簡單的題目,C語言簡單題目

定義陣列,長度必須是個確定的值,char p n 這樣肯定不對 字元比較,不用strcmp,這個是比較字串的,只用用if p i a 這樣就可以了 str i 是個什麼?看不出來 要看區別直復 接,替換到語句中 制就明白了 1,設有一以下巨集定義 define width 80 define len...

求高人解答一道c語言題目,求高人解答一道C語言題目

include include int crypt int decrypt void main int crypt if fp1 fopen file2.txt w null while 1 else break printf d n i fclose fp fclose fp1 return 0 ...