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.
program TinhDienTichHinhTron;
var
fIn, fOut: Text;
r: Integer;
dien_tich: Real;
begin
Assign(fIn, 'dt_ht.inp');
Reset(fIn);
Readln(fIn, r);
Close(fIn);
Assign(fOut, 'dt_ht.out');
Rewrite(fOut);
dien_tich := Pi * r * r;
Writeln(fOut, FormatFloat('0.00', dien_tich));
Close(fOut);
end.
const fi='nhap.txt';
uses crt;
var
f:text;
b:byte;
a:longint;
begin
clrscr;
assign(f,f1);
reset(f);
read(f,a,b);
close(f);
a:=exp(b*ln(a));
write('ket qua la: ',a);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
string st;
int d,i;
int main()
{
freopen("chu_so.txt", "r",stdin);
getline(cin,st);
d=st.length();
for (i=0; i<=d; i++)
if (48<=st[i] && st[i]<=57) cout<<st[i]<<" ";
return 0;
}
#include <iostream>
#include <iomanip>
int main() {
int r;
std::cin >> r;
double pi = 3.14;
double perimeter = 2 * pi * r;
double area = pi * r * r;
std::cout << std::fixed << std::setprecision(2);
std::cout << "p= " << perimeter << std::endl;
std::cout << "s= " << area << std::endl;
return 0;
}
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
int r;
const float Pi = 3.14;
cout << "Nhap ban kinh hinh tron: ";
cin >> r;
float chu_vi = 2 * Pi * r;
float dien_tich = Pi * r * r;
cout << fixed << setprecision(2);
cout << "p= " << chu_vi << endl;
cout << "s= " << dien_tich << endl;
return 0;
}
uses crt;
const fi='dulieu.dat';
var f1:text;
a,b,p,s:array[1..100]of real;
i,n:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
n:=0;
while not eof(f1) do
begin
n:=n+1;
readln(a[n],b[n]);
end;
for i:=1 to n do
begin
p[i]:=(a[i]+b[i])/2;
s[i]:=a[i]*b[i];
end;
for i:=1 to n do
writeln(p[i]:4:2,' ',s[i]:4:2);
close(f1);
readln;
end.
Program HOC24;
var i,n: integer;
c: array[1..1000] of integer;
f: text;
begin
assign(f,'MANG3.TXT');
reset(f);
readln(f,n);
for i:=1 to n do read(f,c[i]);
close(f);
for i:=1 to n do if c[i] mod 2=1 then write(c[i],' ');
readln
end.
Program HOC24;
const fi='INPUTC2.TXT';
var s,r: real;
f: text;
procedure ip;
begin
assign(f,fi);
reset(f);
read(f,r);
s:=r*r*pi;
close(f);
end;
begin
ip;
write('S= ',s:1:2);
readln
end.