You are on page 1of 1

Домашнее задание

Задание №1
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float r1, r2, r3, r01, r0;
cout << "Input 3 resistances\n";
cin >> r1 >> r2 >> r3;
r01 = 1 / r1 + 1 / r2 + 1 / r3;
r0 = 1 / r01;
cout << "Resist of parallel connection=" << r0 << endl;
cout << "\nCreated by Sylka Danylo\n";
}

Задание №2
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float L, S, R, pi;
pi = 3.14;
cout << "Input lenght of circle\n";
cin >> L;
R = L / (2 * pi);
S = pi * (R * R);
cout << "Area of circle=" << S << endl;
cout << "\nCreated by Sylka Danylo\n";
}

Задание №3
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float S, t, a, v;
cout << "Input speed\n";
cin >> v;
cout << "Input acceleration\n";
cin >> a;
cout << "Input time\n";
cin >> t;
S = v * t + ((a * t * t) / 2);
cout << "Distance=" << S << endl;
cout << "\nCreated by Sylka Danylo\n";
}

You might also like