K
Khách

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.

12 tháng 12 2020

uses crt; var x:integer; begin clrscr; x:=0; while x*x*x<=3000 do   begin      write(x:4);      x:=x+1;   end; readln; end.

15 tháng 3 2021

17 tháng 12 2021

#include <bits/stdc++.h>

using namespace std;

long long x,y;

int main()

{

cin>>x;

cout<<x*x*x+y*y*y-2*x;

return 0;

}

uses crt;
var i,n,c,b,uc:integer;
bcnn:int64;
a:array[1..100] of integer;
{--------------------------chuong-trinh-con-tim-ucln-cua-hai-so---------------}
function ucln(c,b:integer):integer;
var r:integer;
begin
r:=c mod b;
while r<>0 do
begin
c:=b;
b:=r;
r:=c mod b;
end;
ucln:=b;
end;
{---------------------------chuong-trinh-chinh-----------------------------------}
begin
clrscr;
Write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;

uc:=ucln(a[1],a[2]);

for i:=3 to n do 

 uc:=ucln(uc,a[i]);

writeln(uc);

readln;

end.

uses crt;

var a,b:integer;

{-------------chuong-trinh-con-tinh-tong---------------------}

function tong(x,y:integer):integer;

begin

tong:=x+y;

end;

{-------------chuong-trinh-con-tinh-tich------------------}

function tich(x,y:integer):integer;

begin

tich:=x*y;

end;

{-----------------chuong-trinh-con-so-lon------------------}

function solon(x,y:integer):integer;

begin

if x>y then solon:=x

else solon:=y;

end;

{-----------------chuong-trinh-con-so-be------------------}

function sobe(x,y:integer):integer;

begin

if x<y then sobe:=x

else sobe:=y;

end;

{--------------------chuong-trinh-chinh-----------------}

begin

clrscr;

write('Nhap a='); readln(a);

write('Nhap b='); readln(b);

writeln('Tong la: ',tong(a,b));

writeln('Tich la: ',tich(a,b));

writeln('So lon la: ',solon(a,b));

writeln('So be la: ',sobe(a,b));

readln;

end.

16 tháng 3 2022

var n:integer; 
begin 
write('Nhap n: '); readln(n); 
if (n mod 3 =0) then 
write(n,' chia het cho 3') 
else 
write(m,' k chia het cho 3'); 
readln; 
end. 

#include <bits/stdc++.h>

using namespace std;

long long x,n,i,t;

int main()

{

cin>>n;

t=0;

for (i=1;i<=n; i++)

{

cin>>x;

if (x%3==0) t+=x;

}

cout<<t;

return 0;

}

17 tháng 4 2021

program tim_tong;

uses crt;

var x,i,tong:longint;

begin

clrscr;

tong:=0;i:=1;

while tong<=3500 do

begin

write('x',i,'=');readln(x);

tong:=tong+x;

i:=i+1;

end;

write('tong cac so tren la:',tong);

readln;

end.

NV
11 tháng 9 2021

\(x^3-x^2+2mx-2m=0\)

\(\Leftrightarrow x^2\left(x-1\right)+2m\left(x-1\right)=0\)

\(\Leftrightarrow\left(x-1\right)\left(x^2+2m\right)=0\)

\(\Leftrightarrow\left[{}\begin{matrix}x=1\\x^2=-2m\end{matrix}\right.\)

Để pt có 3 nghiệm \(\Rightarrow-2m>0\Rightarrow m< 0\)

a. Do vai trò 3 nghiệm như nhau, ko mất tính tổng quát giả sử \(x_1=1\) và \(x_2;x_3\) là nghiệm của \(x^2+2m=0\) 

Để pt có 3 nghiệm pb \(\Rightarrow\left\{{}\begin{matrix}-2m>0\\-2m\ne1\end{matrix}\right.\) \(\Rightarrow\left\{{}\begin{matrix}m< 0\\m\ne-\dfrac{1}{2}\end{matrix}\right.\)

Khi đó: \(x_2+x_3=0\Rightarrow x_1+x_2+x_3=1\ne10\) với mọi m

\(\Rightarrow\) Không tồn tại m thỏa mãn yêu cầu

b.

Giả sử pt có 3 nghiệm, khi đó \(\left[{}\begin{matrix}x_2=-\sqrt{-2m}< 0< 1\\x_3=\sqrt{-2m}\end{matrix}\right.\)

\(\Rightarrow\) Luôn có 1 nghiệm của pt âm \(\Rightarrow\) không tồn tại m thỏa mãn

Em coi lại đề bài

1 tháng 9 2021

Program HOC24;

var s: string;

i: byte;

begin

write('Nhap xau: '); readln(s);

for i:=1 to n do if not(s[i] in ['0'..'9']) then write(s[i]);

readln

end.