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 1:
#include <bits/stdc++.h>
using namespace std;
double a,b,c;
int main()
{
cin>>a>>b>>c;
cout<<fixed<<setprecision(2)<<(a+b+c)/3;
return 0;
}
Bài 2:
#include <bits/stdc++.h>
using namespace std;
long long x,y;
int main()
{
cin >>x>>y;
cout<<x<<" "<<y;
swap(x,y);
cout<<x<<" "<<y;
return 0;
}
Caua1:
program caumot;
begin
writeln('lop 8A chao ban!');
end.
Câu 2:
program cauhai;
int a,b,c :real;
begin
write('a='); readln(a);
write('b='); readln(b);
c= a+b;
write('Tong hai so a b la:',c);
end.
Cau 1:
Câu 2:
#include <bits/stdc++.h>
using namespace std;
long long n;
int main()
{
cin>>n;
if (n>0 && n%5==0) cout<<"Phai";
else cout<<"Khong phai";
}
Program HOC24;
var n,d,i: integer;
B: array[1..100] of integer;
t: longint;
begin
write('Nhap N: '); readln(n);
for i:=1 to n do
begin
write('B[',i,']='); readln(b[i]);
end;
d:=0; t:=0;
for i:=1 to n do
if b[i]>0 then
begin
d:=d+1;
t:=t+b[i];
end;
writeln('Tong cac so duong trong day so la: ',t);
write('Co ',d,' so duong trong day');
readln
end.
uses crt;
var b:array[1..100] of longint;
n,i,d,s:longint;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']: '); readln(b[i]);
if b[i]>0 then begin
inc(d);
inc(s,b[i]);
end;
end;
writeln('Tong cac so duong: ',s);
writeln('Co ',d,' so duong');
readln;
end.
bt2:
Program Tinh_Tong;
var N,i:integer;
S:longint;
begin
write('Nhap so N='); readln(N);
S:=0;
for i:=1 to N do S:=S+i;
write('Tong cua,'N,'so tu nhien dau tien S=',S);
readln
end.
Bt3:
Program Tinh_Giai_Thua;
var N,i:integer;
P:longint;
begin
write('N='); readln(N);
P:=1;
for i:=1 to N do P:=P*i;
writeln(N,'! =',P);
readln
end.
bt1:
Program Ba_canh_tam_giac;
uses crt;
var a,b,c:real;
begin
clrscr;
writeln('Nhap ba so a,b,c:'); readln(a,b,c);
If(a+b>c) and (b+c>a) and (a+c>b) then
writeln('a, b va c la 3 canh cua mot tam giac!');
else writeln('a, b va c khong la 3 canh cua mot tam giac!');
readln
end.