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.
Câu 2:
uses crt;
var a,b:integer;
begin
clrscr;
readln(a,b);
writeln('Tong a+b la ',a+b);
writeln('Hieu a-b la ',a-b);
writeln('Tich cua a*b la ',a*b);
writeln('Thuong cua a/b la ',a/b:4:2);
readln;
end.
Câu 2: (C++)
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << "Tong a+b la: " << a+b << "\nHieu a-b la: " << a-b << "\nTich a*b la: " << a*b << "\nThuong a/b la: " << (double)a/b << endl;
return 0;
}
Chúc bn học tốt!
#include <bits/stdc++.h>
using namespace std;
int main() {
double R, S, pi=3.14159265358979323846;
cin >> R;
S=R*R*pi;
cout << "Dien tich hinh tron la " << fixed << setprecision(21) << S << endl;
return 0;
Chúc bn học tốt! (Bn có thể chỉnh setprecision(21) thành setprecision(2) để cho ngắn gọn nha!)
Program Hoc24;
var a: array[1..32000] of integer;
d,i,n,x: integer;
begin
write('Nhap N: '); readln(n);
for i:=1 to n do
begin
write('Nhap so thu ',i,': '); readln(a[i]);
end;
write('Nhap so can tim: '); readln(x);
d:=0;
for i:=1 to n do if a[i]=x then d:=d+1;
if d>0 then write('Co so can tim trong day ban dau') else write('Khong co so can tim trong day ban dau');
readln
end.
uses crt;
var a:array[1..100]of integer;
n,i,x,kt:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
write('Nhap so can tim: '); readln(x);
kt:=0;
for i:=1 to n do
if a[i]=x then kt:=1;
if kt=0 then writeln(x,' khong co trong day')
else writeln(x,' co trong day');
readln;
end.