-
Notifications
You must be signed in to change notification settings - Fork 0
/
Skaiciavimas.cs
52 lines (44 loc) · 1.45 KB
/
Skaiciavimas.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroupWork
{
public class Skaiciavimas
{
public double Kintamasis1() //Inesa
{
double r = 6371;
double result = Math.PI * Math.Pow(r, 2);
//Console.WriteLine("zemes rutulio plotas yra :" + result);
return result;
}
public double Kintamasis2() //Nerijus
{
double r = 6371, V;
V = 4f / 3f * Math.PI * (r * r * r);
return V;
}
public double Kintamasis3() //Tomas
{
double a = 10.0, b = 15.0, c;
c= Math.Round(Math.Sqrt(a*a + b*b), 2);
return c;
}
public void Paskutinis() //Tomas
{
double kintamasis1 = Kintamasis1();
double kintamasis2 = Kintamasis2();
double kintamasis3 = Kintamasis3();
Console.WriteLine("Viso kintamuju: 3");
Console.WriteLine("Kintamasis1: " + kintamasis1);
Console.WriteLine("Kintamasis2: " + kintamasis2);
Console.WriteLine("Kintamasis3: " + kintamasis3);
double suma = kintamasis1 + kintamasis2 + kintamasis3;
double vidurkis = kintamasis1 + kintamasis2 + kintamasis3 / 3;
Console.WriteLine("Suma: " + suma);
Console.WriteLine("Vidurkis: " + vidurkis);
}
}
}