Pages

Make a program in C# that find the value of final velocity by using Vf=Vi+at.


CODE:


using System;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;

namespace _2EquationofMotion
{
classProgram
    {
staticvoid Main(string[] args)
        {

int Vi, t;
constdouble a = 9.8;
doubleVf;
Console.WriteLine("Please Enter initial velocity:");
            Vi = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please Enter time:");
            t = Convert.ToInt32(Console.ReadLine());
Vf = Vi + a * t;
Console.WriteLine(" with initial velocity {0} and time {1} the value of final velocity is {2}", Vi, t, Vf);


        }
    }

}

OUTPUT:


No comments:

Post a Comment