Changing Fahrenheit to Centigrade - Class Work

This for Changing Fahrenheit to Centigrade example:

class FahrenheitToCentigrade 

{

 public static void main(String[] args) 

 {

  int hbt;
  int result;
  int temp;
 
  temp = 0;
  hbt = 100;
  temp = hbt - 32;
  result = temp*5/9;
  System.out.println("Result = " + result);

 }
}
 

class Circle

{

 public static void main(String[] args) 

 {

  int radius;
  double PI;
  double result;
 
  radius = 3;
  PI = 3.14;
  circle area = 1/2 PI;
  result = temp*5/9;
  System.out.println("Result = " + result);

 }

}

Java Tips

See also
Modulus and OpEquals Example

Do you have a Java Problem?
Ask It in The Java Forum

Java Books
Java Certification, Programming, JavaBean and Object Oriented Reference Books

Return to : Java Programming Hints and Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.