Pages

Make a program in C# that find the value of final velocity by using S= (〖Vf〗^2-〖Vi〗^2)/2a.


CODE:

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

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

int Vi, Vf;
constdouble a = 9.8;
double S;
Console.WriteLine("Please Enter initial velocity:");
            Vi = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please Enter Final Velocity:");
Vf= Convert.ToInt32(Console.ReadLine());
            S = (Vf*Vf-Vi*Vi)/a*0.5;
Console.WriteLine(" with initial velocity {0} and final velocity {1} the value of Displacement is {2}", Vi, Vf, S);


        }
    }
}


 OUTPUT:


No comments:

Post a Comment