Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

help with a c# program


  • Please log in to reply

#1
mrq201

mrq201

    Member

  • 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());
}
Console.WriteLine();
}

}


}
  • 0

Advertisements







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