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 b,c;
int main()
{
cin>>b>>c;
if ((b==0) and (c==0)) cout<<"Vo so nghiem";
else if ((b==0) and (c!=0)) cout<<"Vo nghiem";
else cout<<fixed<<setprecision(2)<<-c/b;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double b,c;
int main()
{
cin>>b>>c;
if ((b==0) and (c==0)) cout<<"Vo so nghiem";
else if ((b==0) and (c!=0)) cout<<"Vo nghiem";
else cout<<fixed<<setprecision(2)<<-c/b;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double b,c;
int main()
{
cin>>b>>c;
if ((b==0) and (c==0)) cout<<"Vo so nghiem";
else if ((b==0) and (c!=0)) cout<<"Vo nghiem";
else cout<<fixed<<setprecision(2)<<-c/b;
return 0;
}
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;
return 0;
}
Câu 1:
uses crt;
var a,b:integer;
begin
clrscr;
readln(a,b);
write(a+b);
readln;
end.
Câu 2:
uses crt;
var a,b,c:integer;
begin
clrscr;
readln(a,b,c);
writeln(a+b-c);
readln;
end.
Câu 3:
uses crt;
var a,b:integer;
begin
clrscr;
readln(a,b);
writeln(a-b);
readln;
end.
Câu 4:
uses crt;
var x,y,z:integer;
begin
clrscr;
readln(x,y,z);
writeln((x+y)*z);
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.
1:
uses crt;
var n,i,t:integer;
begin
clrscr;
readln(n);
t:=0;
for i:=1 to n do
t:=t+i*i;
write(t);
readln;
end.
2
program bt2;
var i,n,t:integer;
begin
readln(n);
s:=0;
for i:=1 to n do
if i mod 2 = 1 then s:=s+i;
readln;
end.
Câu 1:
program Tinhtong:
var
n, i, sum: integer;
begin
write('Nhap n: ');
readln(n);
sum := 0;
for i := 2 to n do
begin
if i mod 2 = 0 then
begin
sum := sum + i;
end;
end;
writeln('Tong cac so chan tu 2 toi ', n, ' la ', sum);
readln;
end.
Câu 2:
program Tinhtong:
var
n, i, sum: integer;
begin
write('Nhap n: ');
readln(n);
sum := 0;
for i := 1 to n do
begin
if i mod 2 = 1 then
begin
sum := sum + i;
end;
end;
writeln('Tong cac so le tu 1 toi ', n, ' la ', sum);
readln;
end.
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;
}
mong mọi người giúp đỡ