•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 427,989 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,515 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
This program consists of one function in one class. It uses MyInput.java to demonstrate how primitive data types are implemented in Java.
package farenheittocelcius; public class FarenheitToCelcius { public static void main(String args[]) { double farenheit, celcius = 0; System.out.println("\n\tPlease enter temp. in farenheit: "); farenheit = MyInput.readDouble(); celcius = (5/9)*(farenheit-32); System.out.println("\n\tThat is " + celcius + " degrees celcius."); } }
Comments (Newest First)
Eddi | Newbie Poster | Sep 20th, 2004
•
•
•
•
Hi Dani,
fine Examples (the others too) to learn programming Java, but where is the MyInput.java class?
Thanks
Eddi
fine Examples (the others too) to learn programming Java, but where is the MyInput.java class?
Thanks
Eddi
Montrell274 | Newbie Poster | Sep 20th, 2004
•
•
•
•
I had to do this same program for a homework assignment, except we had to do celcius to fahrenheit.
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)