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.
Bài 1 :
Uses crt;
Var x,y:integer;
Begin
clrscr;
Readln(x,y);
Write('Tong cua x,y la ',x+y);
Readln
End.
Bài 2 :
Uses CRT;
var x,y,z:integer; tbc:real;
begin
clrscr;
readln(x,y,z);
tbc:=(a+b+c)/3;
Write('Trung binh cong x,y,z la ',tbc:4:2);
Readln
End.
#include <bits/stdc++.h>
using namespace std;
long long x,y,z;
int main()
{
cin>>x>>y>>z;
cout<<x+y+z<<endl;
cout<<x*y*z;
return 0;
}
uses crt;
var m,n: integer;
begin
clrscr;
writeln('Nhap n = '); read(n);
m:=0;
for i:=1 to n do
m:=m+i*i*i;
m:=sqrt(m);
writeln('m = ',m);
readln
end.
const
nhap='input.inp';
xuat='output.out';
var s:int64;
i,n:longint;
begin
assign(input,nhap); reset(input);
assign(output,xuat); rewrite(output);
readln(n);
for i:=1 to n do
s:=s+i;
write(s);
end.
close(input);close(ouput);
uses crt;
var
a,b: integer;
begin
clrscr;
write('Nhap so thu nhat: ');readln(a);
write('Nhap so thu hai: ');readln(b);
writeln('Tong ',a,' va ',b,' la: ',a+b);
readln
end.
Câu 1:
Var
cv,s,a:integer;
begin
write('nhap vao canh hinh vuong:');readln(a);
s:=a*a;
cv:=a*4;
Writeln('chu vi hinh vuong la:',cv);
WRiteln('dien tich hinh vuong la:',s);
readln
end.
Câu 1:
uses crt;
var n,i,kt:integer;
begin
clrscr;
write('Nhap n='); readln(n);
if n<2 then writeln(n,' khong la so nguyen to')
else begin
kt:=0;
for i:=2 to n-1 do
if n mod i=0 then kt:=1;
if kt=0 then writeln(n,' la so nguyen to')
else writeln(n,' khong la so nguyen to');
end;
readln;
end.
Câu 2:
uses crt;
var a:array[1..100]of integer;
i,n,max,min:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
max:=a[1];
min:=a[1];
for i:=1 to n do
begin
if max<a[i] then max:=a[i];
if min>a[i] then min:=a[i];
end;
writeln('So lon nhat la: ',max);
writeln('So nho nhat la: ',min);
readln;
end.
Câu 1:
Var a:Integer;
Begin
Writeln('Nhap a: '); Readln(a);
If (a mod 2)=0 then writeln(a,'chia het cho 2') else (a,' khong chia het cho 2');
Readln;
End.
Câu 2:
Var S,a,b,c:Integer;
Begin
Writeln('Nhap a: '); readln(a);
Writeln('Nhap b: '); readln(b);
Writeln('Nhap c: '); readln(c);
S:=a+b+c;
Writeln('Tong cua ba so la: ',S);
Readln;
End.
Câu 3:
Var a,b,c:Integer;
Begin
Writeln('Nhap a: '); Readln(a);
Writeln('Nhap b: '); readln(b);
Writeln('Nhap c: '); readln(c);
If (a mod 2)=0 then writeln(a,' la so chan') else (a,' la so le');
If (b mod 2)=0 then writeln(b,' la so chan') else (b,' la so le');
If (c mod 2)=0 then writeln(c,' la so chan') else (c,' la so le');
Readln;
End.
tất cả các câu đều là s:=s+i hay s:=s+1/sqr(i)..vân vân bạn ạ