Задачі
Сума кількох дійсних
include <iostream>
include <string>
include <iomanip>
include <cmath>
using namespace std;
int main () {
string a,b,c,d;
cin >> a >> b >> c>>d;
cout << fixed << setprecision (4) << stof(a) +stof(b) <<endl<< stof(a) +stof(b)+stof(c) <<endl<< stof(a) +stof(b)+stof(c)+stof(d);
}
include <iostream>
include <cmath>
using namespace std;
int main () {
double a,b,c,d;
cin >> a >> b >> c>>d;
cout.precision(4); cout<<fixed<<a+b<<endl; cout<<fixed<<a+b+c<<endl; cout<<fixed<<a+b+c+d; return 0; }
include<bits/stdc++.h>
using namespace std; int main(){ long double x,y,z,p; cin>>x>>y>>z>>p; cout<<setprecision(4)<<fixed<<x+y<<" "<<x+z+y<<" "<<z+y+x+p; }
vaqif cix cole
include <iostream>
using namespace std; int main(){ double a,b,c,d; cin>>a>>b>>c>>d; cout.precision(4); cout<<fixed<<a+b<<endl; cout<<fixed<<a+b+c<<endl; cout<<fixed<<a+b+c+d<<endl; }