Viết chương trình tính điểm TB các môn học (Văn, Toán, Ngoại ngữ) ? In ra điểm TB tính được, lấy 1 chữ số thập phân. Dựa vào điểm TB tính được, in ra kết quả xếp loại : “Xếp loại Giỏi” nếu điểm TB từ 8 trở lên; Xếp loại Khá” nếu điểm TB từ 6.5 trở lên và nhỏ hơn 8; “Xếp loại Trung Bình” từ 5 trở lên và nhỏ hơn 6.5; “Xếp loại Chưa Đạt” nếu điểm TB nhỏ hơn 5
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.
if (b%2==0) cout<<"b la so chan";
if (b%2==1) cout<<"b la so le";
Sửa lại:
program fashkfs;
uses crt;
var n, i,j,m: longint;
a, b: array[1..1000] of integer;
begin
clrscr;
readln(n, m);
for i := 1 to m do
begin
read(a[i]);
end;
b[0] := 1;
for i := 1 to m do
begin
for j := 1 to n do
begin
if (b[j - a[i]] <> 0) and (a[i] <= j) then
begin
b[j] := b[j] + b[j - a[i]];
end;
end;
end;
writeln(b[n]);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long a,b;
int main()
{
cin>>a>>b;
cout<<min(a,b)<<" "<<max(a,b);
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double a;
int main()
{
cin>>a;
if (a>=8.0) cout<<"Gioi";
else if (6.5<=a) cout<<"Kha";
else if (5.0<=a) cout<<"Trung Binh";
else if (3.5<=a) cout<<"Yeu";
else cout<<"Kem";
return 0;
}
1:
#include <bits/stdc++.h>
using namespace std;
double r;
int main()
{
cin>>r;
cout<<r*r*pi;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long a,b,c,d;
int main()
{
cin>>a>>b>>c>>d;
cout<<max(a,max(b,max(c,d)));
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double a,b,c,tb;
int main()
{
cin>>a>>b>>c;
tb=(a+b+c)/3;
cout<<fixed<<setprecision(1)<<tb<<endl;
if (tb>=8) cout<<"Gioi";
else if ((6.5<=tb) and (tb<8)) cout<<"Kha";
else if ((5<=tb) and (tb<=6.5)) cout<<"Trung Binh";
else cout<<"Chua dat";
return 0;
}