daveg89's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
5 (0.01 per day)
Joined:
22-February 13
Profile Views:
57
Last Active:
User is offline Feb 22 2013 12:45 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   daveg89 has not set their status

Posts I've Made

  1. In Topic: Struggling to figure out a problem..any help greatly appreciated!

    Posted 22 Feb 2013

    Thanks for the response...


    the increase is actually being added to the total average. For example is the total average of sales for day 1-7 is 180. Lets say I add 5 to the total average for days 8-14. So that would mean day 8 the total average would be 185, day 9 it would be 190 etc...What would be the amount of sales needed for day 8 to give me that increase of 5 to my total average. Hope this clears it up. Thank you.

    So if i add 5 to the average for each day what would be the amount of sales needed for each day to give me that increase of 5 daily.
  2. In Topic: Struggling to figure out a problem..any help greatly appreciated!

    Posted 22 Feb 2013

    Ok the problem gives me the the amount of sales for the first seven days. I need to figure out the average of those days which I have done. But then I need to figure out what the amount of sales would be on day 8 - 14 if I increase the total average by a certain amount. For example If i increase the total average by 5 on day eight how much would I need in sales to get the average increased by that amount. Hope this clarifies it a bit.
  3. In Topic: Struggling to figure out a problem..any help greatly appreciated!

    Posted 22 Feb 2013

    heres an update to what I have still cant figure out how to get the correct number for day 9-14. Im subtracting the new sum by the old sum but that only works for day 8 . I need a way to get it to subtract both the old sum from the first array as well as the previous days from the new sales. Sorry if this sounds confusing.

    heres the updated code

    
    import java.util.Scanner;
    
    public class sales2{
       public static void main(String[] args){
       Scanner user_Input = new Scanner(System.in);
              double []sales = {175, 225, 0, 200, 325, 275, 60};
              double sum = 0, avg;
              double newSum = 0;
              int averageIncrease;
              double newSales = 0;
          
              int i, k;
              
              for (i = 0; i < 7; ++i){
                 sum = sum + sales[i];
                 System.out.println("sales[" + i + "] = " + sales[i]);
              }
              avg = sum/i;
              System.out.println("average  = " + avg);
            
      
              for (k = 8; k < 15; k++) {
             
             System.out.println("How much would you like to increase average sales by?");
             averageIncrease = user_Input.nextInt();
             
              avg = avg + averageIncrease; 
             
              newSum = avg * k ;
            
            
             newSales = newSum - sum;
             
             
                System.out.println("New sales for day[" + k + "] = " +newSales);
              }
              
              
    }
       }
    
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

daveg89 hasn't added any friends yet.

Comments

daveg89 has no profile comments yet. Why not say hello?