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

답변