Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TwelveDaysofChristmas
- {
- public static void main(String[] args)
- {
- System.out.println("Day presents received Total Presents");
- presents1();
- }
- public static void presents1()
- {
- for (int a =1; a<=25; a++)
- {
- System.out.println(a+" "+a+" "+(a*(a+1))/2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement