Answer to Question #10882 in C# for YADAV ANKIT
2012-06-15T11:06:08-04:00
write a program to calculate a sum of all the nos getting an input through command line argument
1
2012-06-15T12:00:07-0400
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 !
Learn more about our help with Assignments:
C#
Comments
Leave a comment