viết chương trình nhập vào số tự nhiên n và tính tổng các ước số của n mà các ước số đó là số nguyên tố.Giải thích n=6 thì ta có các ước số của 6 là 1,2,3,6.Trong đó các ước số là các số nguyên tố chỉ có 2 và 3.Vậy kết quả bằng 5(Pascal). Giúp mik v các bn
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.
uses crt;
var a,b,l,r,i,dem:integer;
begin
clrscr;
readln(a,b,l,r);
dem:=0;
for i:=l to r do
if (i mod a=0) and (i mod b=0) then inc(dem);
write(dem);
readln;
end.
var a,b,dem,L,i,R:longint;
begin
readln(a,b,L,R);
dem:=0;
for i:=L to R do
if (i mod a=0) and (i mod b=0) then inc(dem);
write(dem);
readln;
end.
uses crt;
var a,b,c,ln:integer;
begin
clrscr;
readln(a,b,c);
ln:=a;
if ln<=b then ln:=b;
if ln<=c then ln:=c;
write(ln);
readln;
end.
var a,b,c,max:int64;
begin
readln(a,b,c);
max:=a;
if b=>max then max:=b;
if c=>max then max:=c;
write(max);
readln;
end.
Chương trình trên cho phép người dùng nhập vào dãy số và giá trị K. Sau đó, chương trình sẽ tìm tất cả các đoạn con trong dãy có tổng bằng K và in chúng ra màn hình.
Ví dụ, với dãy số [1, 2, 3, 4, 5] và K = 7, chương trình sẽ in ra:
2 3 4 5 2Đây là tất cả các đoạn con có tổng bằng 7 trong dãy số đã cho.
#include <bits/stdc++.h>
using namespace std;
int main()
{
double n;
cin>>n;
cout<<round(n);
}
#include<bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define all(a) a.begin(),a.end()
#define ii pair<ll,ll>
#define foru(i,a,b) for(i=a;i<=b;i++)
#define ford(i,a,b) for(i=a;i>=b;i--)
using namespace std;
string s;
int main()
{
cin>>s;
for(int i=0;i<s.size();i++)
{
if(s[i]=='.')
return 0;
else
cout<<s[i];
}
return 0;
}
Để đọc thư truyền thống, bạn cần mở bức thư và đọc nội dung được viết trên giấy. Thư truyền thống thường được gửi qua bưu điện hoặc trao tay. Còn để đọc thư điện tử, bạn cần truy cập vào hộp thư điện tử của mình thông qua một thiết bị có kết nối internet. Sau đó, bạn có thể đọc nội dung thư và xem các tệp đính kèm nếu có. Thư điện tử thường được gửi và nhận qua email hoặc các ứng dụng liên quan.
Bạn ấn nút Nguồn bên góc bên phải màn hình , sau đó giữ phím SHIFT rồi ấn vào nút RESTART.
Rồi bạn chờ đến khi ra hình này:
rồi ấn vào Start-up Settings
sau đó bạn chọn RESTART.
Sau khi máy tính khởi động xong, trên màn hình bạn sẽ nhìn thấy tùy chọn Safe Mode. Nhấn phím F4 hoặc phím 4 để khởi động Windows 10 ở chế độ Safe Mode.
rồi bạn sẽ vô dược safe mode
sau khi vào đc safe mode r, bạn hãy restart lại máy để login bth.
Link tham khảo: https://hacom.vn/cach-vao-safe-mode-tren-windows-10
uses crt;
var i,n,t,j,kt:integer;
begin
clrscr;
readln(n);
t:=0;
for i:=2 to n do
if n mod i=0 then
begin
kt:=0;
for j:=2 to trunc(sqrt(i)) do
if i mod j=0 then kt:=1;
if kt=0 then t:=t+i;
end;
write(t);
readln;
end.
cảm ơn bn đã giúp mik nhiều bn thông cảm