photo

prasanta sahoo


SOA University

Last seen: 9ヶ月 前 2015 年からアクティブ

Followers: 0   Following: 0

Student

統計

MATLAB Answers

1 質問
0 回答

ランク
207,421
of 300,853

評判
0

コントリビューション
1 質問
0 回答

回答採用率
100.0%

獲得投票数
0

ランク
 of 21,094

評判
N/A

平均評価
0.00

コントリビューション
0 ファイル

ダウンロード
0

ALL TIME ダウンロード
0

ランク

of 171,319

コントリビューション
0 問題
0 解答

スコア
0

バッジ数
0

コントリビューション
0 投稿

コントリビューション
0 パブリック チャネル

平均評価

コントリビューション
0 ハイライト

平均いいねの数

Feeds

表示方法

質問


Write a function called one_per_n that returns the smallest positive integer n for which the sum 1 + 1/2 + 1/3 + … + 1/n , is greater than or equal to x where x is the input argument. Limit the maximum number n of terms in the sum to 10,000 .
function out=one_per_n(x) if x>10000 out=-1; %fprintf('-1\n'); else total=0; for n=1:x; total=(total+(1/n)); end if...

10年以上 前 | 5 件の回答 | 0

5

回答