Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #28782

Re: assignments

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: assignments
Date Thu, 19 Jun 2014 20:51:19 -0400
Organization A noiseless patient Spider
Lines 19
Message-ID <lo00ib$omt$1@dont-email.me> (permalink)
References <6aafa91c-4b8c-4884-a30d-2c4af8b443c2@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Fri, 20 Jun 2014 00:51:23 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="bd4e1cba8d8592bec5d5ed9e4537fbfd"; logging-data="25309"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180vNcRFLz97HXsGp8TmGdM"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To <6aafa91c-4b8c-4884-a30d-2c4af8b443c2@googlegroups.com>
Cancel-Lock sha1:BaR8s6bwEZFm/laRYC3tfB8DNNo=
Xref csiph.com comp.lang.java.programmer:28782

Show key headers only | View raw


On 6/19/2014 8:44 PM, Ruben Ongayo wrote:
> Write a java program that can add,subtract,multiply,and divide binary??
> Please help me.....

public class Ongayo {
   public static void main(String[] unused) {
     int binary_x = 0b11111011110;
     int binary_y = 0b101010;
     int binary_sum = binary_x + binary_y;
     int binary_difference = binary_x - binary_y;
     int binary_product = binary_x * binary_y;
     int binary_quotient = binary_x / binary_y;
     int binary_modulus = binary_x % binary_y;  // extra credit!
   }
}

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

assignments Ruben Ongayo <rubzm11@gmail.com> - 2014-06-19 17:44 -0700
  Re: assignments Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-06-19 20:51 -0400
    Re: assignments Ruben Ongayo <rubzm11@gmail.com> - 2014-06-19 18:06 -0700
      Re: assignments Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-06-19 21:33 -0400
        Re: assignments Gordon Levi <gordon@address.invalid> - 2014-06-21 20:51 +1000
          Homework sabotage [Was: Re: assignments] Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-06-21 08:46 -0400
  Re: assignments Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2014-06-19 20:49 -0500
  Re: assignments Roedy Green <see_website@mindprod.com.invalid> - 2014-06-20 08:04 -0700

csiph-web