Question

For Q2), Q3) and Q4) use the following formulas as necessany ?=n(n+1) ?: = n(n + 1)(2n + 1) In order to receive marks your approach must rely on sigma notation, summation properties and usage of given formula(s)*It is probably a good idea to test your formula for some values of n. *Answers based on combinatorics will not be accepted.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

JAVA PROGRAM

import java.util.*;

public class time {
  
   public static void main(String []args) {
       Scanner s = new Scanner(System.in);
      
       System.out.print("Enter the value of n: ");
       int n = s.nextInt();
      
       int time = 500;
      
       for(int i=1; i<=n; i++) {
           time = time + 8;
          
           for(int j=7; j<=i+1; j++)
               time = time + 24*j;
       }
      
       System.out.println();
       System.out.println("The value of time is: "+time);
   }
}

Add a comment
Know the answer?
Add Answer to:
For Q2), Q3) and Q4) use the following formulas as necessany ?=n(n+1) ?: = n(n +...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT