Getting started with C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brenda21
    New Member
    • Aug 2007
    • 2

    #1

    Getting started with C#

    Hi to all,
    I have to do some simple programs in c#,only in console aplication,but im at the beginning of learning this language,and i cant if any body can help me those are the exercise:

    1-a program that find if a number is or not a exponencial power of the number 2 (number=2*2*2*2 ....)

    2-a program that do the dividing operation( / ) ,without using "/" or " * ".

    3-a program that sorts an array of strings.The array is filled up randomly.

    I dont have much time.Thank u in advance!

    Brenda
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Brenda. Welcome to TSDN!

    Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).

    I'm going to go ahead and move this thread to the .NET forum, where our resident Experts will be better able to help you out.

    The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. You have not asked a question. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

    Please read the Posting Guidelines and particularly the Coursework Posting Guidlines.

    Then when you are ready post a new question in this thread.

    MODERATOR

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by brenda21
      Hi to all,
      I have to do some simple programs in c#,only in console aplication,but im at the beginning of learning this language,and i cant if any body can help me those are the exercise:

      1-a program that find if a number is or not a exponencial power of the number 2 (number=2*2*2*2 ....)

      2-a program that do the dividing operation( / ) ,without using "/" or " * ".

      3-a program that sorts an array of strings.The array is filled up randomly.

      I dont have much time.Thank u in advance!

      Brenda
      What have you done so far? I have a couple of tricks up my sleeves for simple
      things like you mentioned, but I don't want to give those tricks away to someone
      who doesn't even understand the basics yet.

      kind regards,

      Jos

      Comment

      • SammyB
        Recognized Expert Contributor
        • Mar 2007
        • 807

        #4
        Originally posted by brenda21
        Hi to all,
        I have to do some simple programs in c#,only in console aplication,but im at the beginning of learning this language,and i cant if any body can help me those are the exercise:

        1-a program that find if a number is or not a exponencial power of the number 2 (number=2*2*2*2 ....)

        2-a program that do the dividing operation( / ) ,without using "/" or " * ".

        3-a program that sorts an array of strings.The array is filled up randomly.

        I dont have much time.Thank u in advance!

        Brenda
        Do you need help with C# language or how to solve the problem. Hints to help solve the problems:
        1) What would happen if you divided by 2?
        2) How would you multiply two numbers by only using addition?
        3) Doesn't the array class have a sort method?
        HTH --Sam

        Comment

        • brenda21
          New Member
          • Aug 2007
          • 2

          #5
          Jos for the exercise 1 & 2 i have done some thing .For example for the 1st someone help me to do a simple way,by multiplacation until the number limit sth like this.But a friend tells me sth that have to do with the binary operator,sth with shifting.For the 2nd i have done a simple recursive program that function,but my friend said to sth with overloadin operators,if u can help with that.
          Sam to not remention what a said before,for the 1st i thought of dividing by 2 until it becomes 1 or fewer,for the second i have done sth with that,for the 3rd i want another not the class method.

          Thank u so much guys,

          Brenda

          Comment

          Working...