Java Application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pchahar
    New Member
    • Dec 2006
    • 9

    Java Application

    Can you write a java application that calculates the value of the following expressions
    a+=b/c%d++ and bx<<=8

    The range of values for a=5, b=5, c=3, and d=2
    bx values are -1,0,1,2,3,7,16
  • DeMan
    Top Contributor
    • Nov 2006
    • 1799

    #2
    yes .

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by pchahar
      Can you write a java application that calculates the value of the following expressions
      a+=b/c%d++ and bx<<=8

      The range of values for a=5, b=5, c=3, and d=2
      bx values are -1,0,1,2,3,7,16
      You need to show some of your own effort first before people can start helping you out.

      Comment

      • latasha
        New Member
        • Jan 2007
        • 1

        #4
        Originally posted by r035198x
        You need to show some of your own effort first before people can start helping you out.

        Hello, I need the same help. I got to write a java application a+=b/c%d++
        a=5, b=4, c=3, and d=2 and bx<<=8

        I can send you what I have been working with if you want me to. Thanks

        Comment

        • horace1
          Recognized Expert Top Contributor
          • Nov 2006
          • 1510

          #5
          Originally posted by latasha
          Hello, I need the same help. I got to write a java application a+=b/c%d++
          a=5, b=4, c=3, and d=2 and bx<<=8

          I can send you what I have been working with if you want me to. Thanks
          post the code you have been working on then we can try to help

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            Originally posted by latasha
            Hello, I need the same help. I got to write a java application a+=b/c%d++
            a=5, b=4, c=3, and d=2 and bx<<=8

            I can send you what I have been working with if you want me to. Thanks
            Yes, please send the program that you have written.

            Comment

            • analoveu
              New Member
              • Jan 2007
              • 36

              #7
              Originally posted by pchahar
              Can you write a java application that calculates the value of the following expressions
              a+=b/c%d++ and bx<<=8

              The range of values for a=5, b=5, c=3, and d=2
              bx values are -1,0,1,2,3,7,16

              I think the value of a will be 5 ??right???
              but I don't know what does he mean and want bat the expression "bx<<=8"

              Comment

              • hirak1984
                Contributor
                • Jan 2007
                • 316

                #8
                here is a sample code
                Code:
                public class MM {
                public  static void main(String args[])
                {
                	int a=5,b=5,c=3,d=2;
                	int bx[]={-1,0,1,2,3,7,16};
                	System.out.println(a+=b/c%d++ );
                	for(int i=0;i<7;i++)
                	System.out.println(bx[i]<<=8);
                }
                }
                and here is the sample outputs:
                Code:
                6
                -256
                0
                256
                512
                768
                1792
                4096
                anybody please tell me if i am wrong .

                Comment

                Working...