-
Notifications
You must be signed in to change notification settings - Fork 1
/
Program.cs
45 lines (27 loc) · 936 Bytes
/
Program.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace project1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Power of ball");
string p1 = Console.ReadLine();
double p = Convert.ToDouble(p1);
Console.WriteLine("overall time of ball between two places");
string t1 = Console.ReadLine();
double t = Convert.ToDouble(t1);
double energy = p*t;
String num1 = Console.ReadLine();
int number = Convert.ToInt32(num1);
energy = energy + number;
double result = energy - energy * 0.5 ;
Console.WriteLine("Total value is " + result);
Console.ReadLine();
}
}
}