How to make simple mass calculator program in c#
Write a program which takes a
quantity mass as input and calculates Force applied on an object. (F=m*a)
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
namespace simple
{
class
Program
{
static void Main(string[] args)
{
int m,f;
int a=5;
Console.Write("Please
Insert a Mass: ");
m = int.Parse(Console.ReadLine());
f = m * a;
Console.WriteLine("Force
is: " + f);
}
No comments:
Post a Comment