• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help me to solve this assignments..

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Write a program to print a triangle multiplication table as shown below:
0
0 2
0 3 6
0 4 8 12
0 5 10 15 20
0 6 12 18 24 30
0 7 14 21 28 35 42
2.Write a Java program that will display the factorial of the number 10.
3.Write a Java Program to display a four by four identity matrix
4.Write a program to calculate the sum of the odd integers between 1 and 99 using for loop.
kindly help me to solve this assignment.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunatly, I don't believe anyone is going to help you with this. The Javaranch does not promote completing school assignments, but I will let a Moderator tell you all about that.
What we can do though is aid you in the process. But you first have to show us that you are trying to do the assignment. Have you started? Do you have any code? Show what you have so far and we can at best point you in the right direction.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try doing a search on factorial or whatever. These have been discussed before. However YOU need to TRY them first if you want to get anything out of it.
 
Richard Selva
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am I correct in all??!!!

selva.
[ May 29, 2002: Message edited by: Dirk Schreckmann ]
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you are pretty close!
The first part is correct, the second is supposed to calculate the factorial of 10 not 6 though. I would also recommend that you use a more descriptive variable names and not the letter 'l'. Looks too much like the number '1'.

and the sum of all integers from 1-99 needed some more work!

and your matrix looks fine
any more problems?
Jamie
[ May 29, 2002: Message edited by: Jamie Robertson ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic