hi sir at mam, baka po may pedeng makatulong, nakapagtanong tanong na po kaso wala ganu makasagot.
Using 2D Arrays, create a complete C# program that will accept 10 of your classmates’ names and their Prelim GWA. The program should sort the list based on the highest GWA.
Console.WriteLine(" lowest is {0} ", lowest);
Console.WriteLine(" highest is {0} ", highest);
Console.ReadLine();
}
}
}
Tapos ang logic base mo Array
Search mo na lang yung array samples then ang main mo is to
put a value as integer
then after that yung value na yun yung pwede mo ilagay variable as "Name" Then set ka ng array kung ano yung GWA ng set ng names
halimbawa
si Jen = variable a
si Ben = variable b
Then
a = [9.1] [8.2] [8]
b = [7.9] [8.4] [9]ganyan lang logic setting array tapos ayan na idea.
Console.WriteLine(" lowest is {0} ", lowest);
Console.WriteLine(" highest is {0} ", highest);
Console.ReadLine();
}
}
}
Tapos ang logic base mo Array
Search mo na lang yung array samples then ang main mo is to
put a value as integer
then after that yung value na yun yung pwede mo ilagay variable as "Name" Then set ka ng array kung ano yung GWA ng set ng names
halimbawa
si Jen = variable a
si Ben = variable b
Then
a = [9.1] [8.2] [8]
b = [7.9] [8.4] [9]ganyan lang logic setting array tapos ayan na idea.
salamat po dito, sir pakitingin po ito ginawa ko.
using System;
namespace Act124
{
class Program
{
static void Main(string[] args)
{
string[,] n = new string[10, 1];
int[,] gwa = new int[10, 1];
n[0, 0] = Console.ReadLine();
for (int a = 0; a < n.GetUpperBound(1); a++)
{
for (int b = 0; b < n.GetUpperBound(1); b++)
{
Console.WriteLine("Enter your Surname :");
n[a, b] = Console.ReadLine();
Array.Sort(gwa);
for (int a = 0; a < n.GetUpperBound(1); a++)
{
for (int b = 0; b < n.GetUpperBound(1); b++)
{
Console.WriteLine("Your Surname is " + n[a, b] + " and your GWA is " + gwa[a, b]);
}
}
}
}
}
ang problem po dito ay yung Array.Sort, see attach file po sir, ayan po ang problem.