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 v,t,d: real;
k: string;
begin
writeln('Nhap khoi (A, B hoac C): '); read(k);
writeln('Nhap diem Toan: '); read(t);
writeln('Nhap diem Van: '); read(v);
if k = 'A' then d:=t*2+v else
if k = 'C' then d:=t+v*2 else d:=t+v+(t+v)/2;
writeln('Diem cua ban la ',d:5:2);
readln
end.
#include <bits/stdc++.h>
using namespace std;
double a,b,c,tbc;
int main()
{
cin>>a>>b>>c;
tbc=(a+b+c)/3;
cout<<"Tong la:"<<fixed<<setprecision(2)<<a+b+c<<endl;
cout<<"TBC la:"<<fixed<<setprecision(2)<<tbc;
return 0;
}
Program HOC24;
var m,n,i: integer;
t1,t2: longint;
begin
write('Nhap m;n: '); readln(m,n);
t1:=1; t2:=1;
for i:=1 to n do t1:=t1*i;
for i:=m to n do t2:=t2*i;
writeln('T1=',t1);
write('T2=',t2);
readln
end.
uses crt;
var a,b,i,j:integer;
st:string;
begin
clrscr;
repeat
write('Ban muon ve khong:'); readln(st);
if st='Yes' then
begin
write('Nhap chieu dai:'); readln(a);
write('Nhap chieu rong:'); readln(b);
for i:=1 to a do
begin
for j:=1 to b do
write('*');
writeln;
end;
end
else break;
until st='No';
readln;
end.
uses crt;
const fi='dulieu.txt';
var f1:text;
st:string;
i,d:integer;
begin
clrscr;
assign(f1,fi); rewrite(f1);
write('Nhap xau:'); readln(st);
d:=length(st);
for i:=1 to d do
if (st[i] in ['A'..Z']) or (st[i] in ['0'..'9']) or (st[i]=#32) then write(f1,st[i]);
close(f1);
end.
uses crt;
var a,b,c,tb:array[1..100]of real;
i,n:integer;
begin
clrscr;
n:=5;
for i:=1 to n do
begin
readln(a[i],b[i],c[i]);
end;
for i:=1 to n do
tb[i]:=(a[i]+b[i]+c[i])/3;
for i:=1 to n do
writeln('Diem trung binh cua ban thu ',i,' la: ',tb[i]:4:2);
readln;
end.