Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

help with a c# program

  • Please log in to reply




  • Member
  • PipPipPip
  • 252 posts
does anyone know how to help me with this program for my class

i am trying to write a program that lets the user enter four quarterly sales figures for six divisions of any company. The figures should be stored in a two dimensional array. Once the figures are entered the program should display these data for each quarter.

A list of the sales figures by division
each divisions increase or decrease from the previous quarter
the total sales for the quarter
the companys increase of decrease from the previous quarter
The average sales for all divisions that quarter
the division with the highest sales

so far i got this but im stuck on the rest.... any help will be appreciated

using System;

public class qSSTATS
public static void Main()
double[,] stats = new double[6, 4];
double totalSales = 0.0;
double avgSales = 0.0;

Console.WriteLine("This will now calculate your Total and Average");
Console.WriteLine("sales of the company. Enter your data");

for (int div = 0; div < 6; div++)
for (int qtr = 0; qtr < 4; qtr++)
Console.Write("Division {0}, Quarter {1}: $", (div + 1), (qtr + 1));
stats[div, qtr] = Convert.ToDouble(Console.ReadLine());


  • 0


Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP