when you enter a,b,c,d,e numbers by keyword
COUNTING
A. Sum of numbers
B. Multiply numbers
C. Greatest number
D. descending of numbers
PRINTING ON SCREEN
A- Sum of numbers
B- Sum of multiplication
C- The greatest number
D- descenging of numbers
using System;
class Program
{
static void Main(string[] args)
{
int[] value = new int[5];
int sum = 0, multip = 1;
string tpl="",crp="";
for (int i = 0; i < 5; i++)
{
Console.Write("\n" + (char)(i + 5) + ":");
if (i != 4)
{ tpl += sum.ToString() + "+"; crp += value.ToString() + "*"; }
else
{ tpl += value.ToString(); crp += value.ToString(); }
}
Console.Clear();
Console.Write(tpl + "=" + sum.ToString() + "\n");
Console.Write(crp + "=" + multip.ToString());
Array.Sort(value);
Console.Write("\n Greatest number=" + value[4].ToString() + "\n");
for (int i = 0; i < 5; i++)
Console.Write(value.ToString() + " ");
Console.ReadKey();
}
}
i wrote this but it did not work.
i use sharp developer and the codes must be compiles by csharp developer.
this should be a command prompt application.
any help is appreciated. i need it urgently.
due day is tomorrow.
thanks