CODE TO PRINT FIRST EQUAION OF MOTION IN C#
CODE TO PRINT FIRST EQUAION OF MOTION IN C#
CODE:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace expression_program
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter initial velocity (vi): ");
double vi = Convert.ToDouble(Console.ReadLine());
Console.Write("Enter acceleration (a): ");
double a = Convert.ToDouble(Console.ReadLine());
Console.Write("Enter time (t): ");
double t = Convert.ToDouble(Console.ReadLine());
double vf = vi + a * t;
Console.WriteLine("The Final Velocity (vf):"+vf);
}
}
}
Comments
Post a Comment