Closed Thread
Results 1 to 3 of 3

Thread: Compilation error

  1. #1
    nagarjuna02 is offline Newbie
    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    0

    Compilation error

    using System;
    class program
    {
    static void Main(string[] args)
    {
    public int find( int n, int p)
    {
    if(n==0) return p;
    else return find(p%n,n);
    }
    Console.WriteLine( find(12,8));
    }

    }


    This code is giving compilation errors.
    I am new to c# programming.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    lobo521 is offline Learning Programmer
    Join Date
    Jan 2010
    Posts
    57
    Rep Power
    8

    Re: Compilation error

    Code:
    using System;
    class program
    {
    static void Main(string[] args)
    {
    Console.WriteLine( find(12,8));
    }
    
    public int find( int n, int p) 
    {
    if(n==0) return p;
    else return find(p%n,n);
    }
    
    }

  4. #3
    nagarjuna02 is offline Newbie
    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    0

    Re: Compilation error

    Thank You

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. compilation error
    By eman ahmed in forum Java Help
    Replies: 5
    Last Post: 09-30-2010, 09:01 AM
  2. Compilation Error: Pairs and xutility
    By cod3b3ast in forum C and C++
    Replies: 5
    Last Post: 04-16-2010, 02:29 PM
  3. G++ Compilation Error Doesn't Make Sense
    By deltatux in forum C and C++
    Replies: 8
    Last Post: 02-19-2009, 02:17 PM
  4. c++/cli - irritating compilation error
    By jwa in forum Managed C++
    Replies: 2
    Last Post: 01-20-2008, 06:43 PM
  5. Compilation Error
    By Victor in forum Java Help
    Replies: 6
    Last Post: 10-05-2007, 06:56 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts