using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lab2
{
class Program
{
static void Main(string[] args)
{
int noofagents;
int[][] intJaggedArray;
string[] names;
Console.WriteLine("NUmber of agents ? ==>");
noofagents = Convert.ToInt32(Console.ReadLine());
names = new string[noofagents];
for (int i = 0; i < noofagents; i++)
{
Console.WriteLine("Agent Name # {0}==>", i + 1);
names[i] = Console.ReadLine();
Console.WriteLine("NUmber of Homes sold by {0}===>", names[i]);
int noofhomes=Convert.ToInt32(Console.ReadLine());
intJaggedArray = new int[noofhomes][];
for (int j = 1; j < noofhomes; j++)
{
intJaggedArray[j] = new int[j + 1];
for (int k = 0; k < j; k++)
{
Console.WriteLine("Saleprice for Home # {0} ==>", k++);
intJaggedArray[j][k] =Convert.ToInt32( Console.ReadLine());
}
}
}
}
}
}
-------------------I am not getting any error but i am not also getting the output as i need.Please help me what was my mistake here...Thanks n advance

New Topic/Question
Reply



MultiQuote







|