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.
![](https://rs.olm.vn/images/avt/0.png?1311)
Bài 1
Var s,i:integer;
tb:real;
Begin
Write('Nhap n = ');readln(n);
i:=1;
s:=0;
While i<=n do
Begin
s:=s+i;
i:=i+1;
End;
tb:=s/n;
Writeln('Tong la ',s);
Write('Trung binh la ',tb:10:2);
Readln;
End.
Bài 2
Var i,n,souoc:integer;
Begin
Write('Nhap n = ');readln(n);
i:=1;
While i <= n do
Begin
i:=i + 1;
If n mod i = 0 then souoc:=souoc + 1;
End;
If souoc = 1 then write(n,' la so nguyen to')
Else write(n,' khong la so nguyen to');
Readln;
End.
![](https://rs.olm.vn/images/avt/0.png?1311)
Câu 58:
Var n:integer;
Begin
Write('n = ');readln(n);
If n mod 2 <> 0 then write(n,' la so le')
Else write(n,' khong la so le');
Readln
End.
Câu 61:
Var n:integer;
Begin
Write('n = ');readln(n);
If n mod 2 = 0 then write(n,' la so chan')
Else write(n,' khong la so chan');
Readln
End.
![](https://rs.olm.vn/images/avt/0.png?1311)
program;
uses crt;
var a:longint;
begin
clrscr;
write('nhap a:');readln(a);
if(a>=0)and(a<=50)then write('n nam trong khoang tu 1 den 50')
else write('n khong nam trong khoang tu 1 den 50');
readln;
#include <bits/stdc++.h>
using namespace std;
int a;
int main()
{
cin>>a;
if ((a>=1) and (a<=50)) cout<<"YES";
else cout<<"NO";
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a:integer;
begin
clrscr;
readln(a);
if (a mod 3=0) or (a mod 5=0) then write('co')
else writeln('khong');
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var n:integer;
begin
clrscr;
repeat
write('Nhap n='); readln(n);
until n>0;
if n mod 2=0 then writeln(n,' la so chan')
else writeln(n,' la so le');
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a:integer;
begin
clrscr;
write('Nhap a='); readln(a);
if (a mod 3=0) and (a mod 5=0) then writeln(a,' dong thoi chia het cho 3 va 5')
else writeln('Khong thoa dieu kien');
readln;
end.
Help
uses crt;
var a,i:integer;
BEGIN
clrscr;
write('Nhap so nguyen a: ');
readln(a);
xl mình chỉ ms bt tới khúc này