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.
#include <bits/stdc++.h>
using namespace std;
double a,b;
int main()
{
cin>>a>>b;
if (b==0) cout<<"Ko tinh duoc";
else
{
cout<<a+b<<endl;
cout<<a-b<<endl;
cout<<a*b<<endl;
cout<<a/b;
}
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long a,b,t;
int main()
{
cin>>a>>b>>t;
if (t==a+b) cout<<"chuc mung ban da tinh dung";
else cout<<"rat tiec ban da lam sai";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long a[1000],n,i,x;
int main()
{
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
cin>>x;
bool kt=false;
for (i=1; i<=n; i++)
if (a[i]==x)
{
cout<<i;
break;
kt=true;
}
if (kt==false) cout<<"Khong co";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long n,i,s;
int main()
{
cin>>n;
if (n%2==0)
{
s=1;
for (i=1; i<=n; i++)
if (i%2==0) s=s*i;
cout<<s;
}
else
{
s=1;
for (i=1; i<=n; i++)
if (i%2==1) s=s*i;
cout<<s;
}
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long x,y;
int main()
{
cin>>x>>y;
if (x>y) cout<<"x la so lon";
else cout<<"x khong la so lon";
return 0;
}
Var x,y:real;
Begin
Write('Nhap so a = ');readln(a);
Write('Nhap so b = ');readln(b);
If a > b then write(a,' la so lon')
Else write(a,' khong la so lon');
Readln;
End.
uses crt;
var a, b: logint;
Begin
write('nhap so a ='); Readln(a);
write('nhap so b ='); readln(b);
If (a = 0 and b = 0)
then write ('pt co nghiem x thuoc R')
else
if (a=0 and b#0) then write('pt vo nghiem')
else
write(nghiẹm la x=': -b/a);
readln
end.
uses crt;
var a, b: logint;
Begin
write('nhap so a ='); Readln(a);
write('nhap so b ='); readln(b);
If (a = 0 and b = 0)
then write ('pt co nghiem x thuoc R')
else
if (a=0 and b#0) then write('pt vo nghiem')
else
write(nghiẹm la x=': -b/a);
readln
end.
uses crt;
var x:real;
begin
clrscr;
write('x='); readln(x);
if x>0 then writeln(sqr(x):4:2)
else writeln(x:4:2,' khong phai la so duong');
readln;
end.