Viết chương trình tính tổng A = \(\dfrac{1}{1}\) + \(\dfrac{1}{2}\) + \(\dfrac{1}{3}\) + ... + \(\dfrac{1}{n}\)
__________________________
Rất mong mọi người giúp đỡ mình ạ T-T
Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
\(\dfrac{1}{x}+\dfrac{1}{y}+\dfrac{1}{z}=0\Rightarrow xy+yz+xz=0\)
A=\(xyz\left(\dfrac{1}{x^3}+\dfrac{1}{y^3}+\dfrac{1}{z^3}\right)=xyz\left(\dfrac{1}{x^3}+\dfrac{1}{y^3}+\dfrac{1}{z^3}-\dfrac{3}{xyz}+\dfrac{3}{xyz}\right)=xyz.\dfrac{3}{xyz}=3\)
bạn tự chứng minh \(\dfrac{1}{x^3}+\dfrac{1}{y^3}+\dfrac{1}{z^3}-\dfrac{3}{xyz}=0\) nha
đặt \(\dfrac{1}{x}=a;\dfrac{1}{y}=b;\dfrac{1}{z}=c\)
bài toán thành \(a^3+b^3+c^3-3abc=0\) nha
Thuật toán:
Bước 1: Nhập n
Bước 2: i←1; a←0;
Bước 3: a←a+1/(i*(i+2));
Bước 4: i←i+1;
Bước 5: Nếu i<=n thì quay lại bước 3
Bước 6: xuất a
Bước 7: Kết thúc
Viết chương trình:
uses crt;
var a:real;
i,n:longint;
begin
clrscr;
write('Nhap n='); readln(n);
a:=0;
for i:=1 to n do
a:=a+1/(i*(i+2));
writeln(a:4:2);
readln;
end.
\(\dfrac{x+1}{39}+\dfrac{x+2}{38}+\dfrac{x+3}{37}=0\)
\(\Leftrightarrow\dfrac{x+1}{39}+1+\dfrac{x+2}{38}+1+\dfrac{x+3}{37}+1-3=0\)
\(\Leftrightarrow\dfrac{x+40}{39}+\dfrac{x+40}{38}+\dfrac{x+40}{37}=3\)
\(\Leftrightarrow\left(x+40\right)\left(\dfrac{1}{39}+\dfrac{1}{38}+\dfrac{1}{37}\right)=3\)
\(\Leftrightarrow\left(x+40\right).\dfrac{4331}{54834}=3\)
\(\Leftrightarrow x+40=\dfrac{164502}{4331}\)
\(\Leftrightarrow x=\dfrac{-8738}{4331}\)
-Vậy \(S=\left\{\dfrac{-8738}{4331}\right\}\)
Giải:
a) -2/3.4/5+2/5:9/11
=-8/15+22/45
=-2/45
b) (-6,2:3,7):0,2
=-62/37:0,2
=-310/37
Chúc bạn học tốt!
#include <bits/stdc++.h>
using namespace std;
double s,a;
int i,n;
int main()
{
cin>>a;
s=0;
n=0;
while (s<=a)
{
n=n+1;
s=s+1/(n*1.0);
}
cout<<n;
return 0;
}
Program HOC24;
var a: real;
i,n: integer;
begin
write('Nhap n='); readln(n);
a:=0;
for i:=1 to n do a:=a+1/i;
write('A= ',a);
readln
end.