programming-examples/c-sharp/Basic/C# Program to Calculate Acceleration.cs

23 lines
493 B
C#
Raw Normal View History

2019-11-18 14:44:36 +01:00
/*
* C# Program to Calculate Acceleration
using System;
class program
{
static void Main(string[] args)
{
int v, t, acc;
Console.WriteLine("Enter the Velocity : ");
v = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the Time : ");
t = int.Parse(Console.ReadLine());
acc = v / t;
Console.WriteLine("Acceleration : {0}", acc);
}
}
/*
Enter the Velocity :
10
Enter the Time :
2
Acceleration : 5