Home » questions » plz help me ............?

plz help me ............?

2006-08-10 02:33:34, Category: Programming & Design
how do u write aprogram to display a name with out using semicolon?and also how to write a program to find a factorial of a number' n' where 'n' is input by the user? thanx Nestor for answering this quest but i understood only little:) actually iam a beginner. i am learning it now ............ and is there any site where i can get any hint regarding finding solution.

Answers

  1. mannu s

    On 2006-08-10 03:03:51


    i will help u but first u help me
  2. ccsCoder

    On 2006-08-11 23:18:31


    simple void main() { if ( printf("your name") ) { } } // done
  3. Nestor

    On 2006-08-10 02:59:52


    public class Factorial { // return n! // precondition: n >= 0 and n <= 20 public static long factorial(long n) { if (n < 0) throw new RuntimeException("Underflow error in factorial"); else if (n > 20) throw new RuntimeException("Overflow error in factorial"); else if (n == 0) return 1; else return n * factorial(n-1); } public static void main(String[] args) { long N = Long.parseLong(args[0]); System.out.println(factorial(N)); } }
  4. patriot_raj

    On 2006-08-10 02:52:16


    ask only question... don't write story... ok
  5. shamanam

    On 2006-08-10 02:44:31


    ?
  6. cerebral_orgasm

    On 2006-08-10 03:01:57


    for the latter you have a simple function within the formulae in excel