Professional Documents
Culture Documents
One-D Array
One-D Array
One-D Array
score
11-18-19 11-19-19
Date Performed Date Submitted
LASQUETY, JOHN DENVER S.
BSIT 102
PROBLEM #01
Create a program that will ask the user to enter 10 numbers and display it in ascending
order.
Console.WriteLine("");
Array.Sort(x);
a[b] = int.Parse(Console.ReadLine());
}
w = a.Min();
q = a.Max();
foreach (int b in a)
{
if (b > w && b < q)
{
w = b;
}
}
Console.WriteLine();
Console.WriteLine("First to the highest: {0}", q);
Console.WriteLine("Second to the highest: {0}", w);
int e, r;
r = a.Max();
e = a.Min();
foreach (int b in a)
{
if (b < r && b > e)
{
r = b;
}
}
Console.ReadLine();
Output of problem #3:
PROBLEM #04
Create a program that will check if a given word is a palindrome or not a palindrome.
Code:
string x, r;
Console.Write("Enter a word: ");
x = Console.ReadLine();
char[] c = x.ToCharArray();
Array.Reverse(c);
r = new string(c);