Viết chương trình nhập 2 số nguyên a và b. Tìm phần nguyên của phép chia a cho b? Các bạn có thể giúp mik trong hôm nay k nếu đc thì mik xin cảm ơn
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 3:
#include <bits/stdc++.h>
using namepsace std;
double a,b,c,p,s;
int main()
{
cin>>a>>b>>c;
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<fixed<<setprecision(2)<<s;
return 0;
}
Câu 3:
#include <bits/stdc++.h>
using namepsace std;
double a,b,c,p,s;
int main()
{
cin>>a>>b>>c;
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<fixed<<setprecision(2)<<s;
return 0;
}
Program HOC24;
var i,n,d: integer;
a: array[1..1000] of integer;
begin
write('Nhap N: '); readln(n);
for i:=1 to n do
begin
write('Nhap so thu ',i,': '); readln(a[i]);
end;
d:=0;
for i:=1 to n do if a[i] mod 5<>0 then d:=d+1;
write('Co ',d,' so khong chia het cho 5');
readln
end.
Câu 3:
#include <bits/stdc++.h>
using namepsace std;
double a,b,c,p,s;
int main()
{
cin>>a>>b>>c;
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<fixed<<setprecision(2)<<s;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int a,b,c,d;
int main()
{
cout<<"Nhap so a: ";
cin>>a;
cout<<"Nhap so b: ";
cin>>b;
c=a/b;
d=a%b
cout<<"Phan nguyen phep chia la: "<<c<<endl;
cout<<"Phan du phep chia la: "<<d;
Return 0;
}