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,c;
int main()
{
cin>>a>>b>>c;
cout<<fixed<<setprecision(2)<<a+b+c;
return 0;
}
#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.
Program Chu_nhat; uses crt;
Var a, b, S, CV: real;
Begin
Write('Nhap chieu dai:'); readln(a);
Write('Nhap chieu rong:'); readln(b);
S := a*b;
CV := (a+b)*2;
Writeln('Dien tich hinh chu nhat la:',S:3:2);
Writeln('Chu vi hinh chu nhat la:',CV:3:2);
readln;
end.
Bài 1:
uses crt;
var n,i,s:integer;
begin
clrscr;
write('Nhap n='); readln(n);
s:=0;
i:=1;
while i<=n do
begin
s:=s+i;
inc(i);
end;
writeln('Tong cac so trong khoang tu 1 den ',n,' la: ',s);
readln;
end.
Bài 2:
uses crt;
var n,i,s:integer;
begin
clrscr;
write('Nhap n='); readln(n);
s:=0;
i:=1;
while i<=n do
begin
s:=s+i;
i:=i+2;
end;
writeln('Tong cac so le trong khoang tu 1 den ',n,' la: ',s);
readln;
end.
uses crt;
var a,b:real;
begin
clrscr;
readln(a,b);
writeln(2*(a+b):4:2);
writeln(a*b:4:2);
readln;
end.
Uses crt;
var i,n,k,u,f,y: longint;
a: array[1..100] of longint;
begin clrscr;
readln(n);
for i:=1 to n do read(a[i]); readln;
writeln(a[i]);
for i:=1 to n do if(a[i]<0) then k:=k+a[i];
for i:=1 to n do if(a[i]>0) then u:=u+a[i];
for i:=1 to n do if(a[i] mod 2<>0) then f:=f+a[i];
for i:=1 to n do if(a[i] mod 2=0) then y:=y+a[i];
writeln('Tong cac so am la: ',k);
writeln('Tong cac so khong am: ',u);
writeln('Tong cac so le la: ',f);
writeln('Tong cac so chan la: ',y);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a,b,c,p;
int main()
{
cin>>a>>b>>c;
p=a+b+c;
cout<<fixed<<setprecision(2)<<p;
return 0;
}