write a program to calculate a sum of all the nos getting an input through command line argument
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
try
{
float sum = 0;
for (; ; )
{
Console.Write("Enter number: ");
sum += float.Parse(Console.ReadLine());
Console.WriteLine("The sum is " + sum.ToString());
}
}
catch (Exception exp) {
}
}
}
}