63 821
Assignments Done
99,4%
Successfully Done
In August 2018

Answer to Question #10882 in C# for YADAV ANKIT

Question #10882
write a program to calculate a sum of all the nos getting an input through command line argument
Expert's answer
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) {

}

}
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions