Homework that's not working

Hey got this Problem for homework that's not working: we're supposed to do a program that ends up looking like this...
Celsius Fahrenheit Fahrenheit Celsius
40.0 105.0 120.0 48.89
39.0 102.2 110.0 43.33
32.0 89.6 40.0 5.44
31.0 87.8 30.0 -1.11
but here's my source code that "just ain't working"
public class FCtemp
//Michael Young II
//ITP 120 Java Programming
//Homework Page Review Question 5.8
//Celsius to Fahrenheit and Back
public static void main(String[] args)
//Variable
double fahrenheit;
system.out.println("Please Enter the Fahrenheit Temperature" + fahrenheit);
/** Converts from Fahrenheit to Celsius*/
public static double fahrenheitToCelsius(double fahrenheit)
celsius = fahrenheit - 32;
system.out.println("The Celsius Conversion Temperature is" + celsius);
system.out.println("Please Enter the Celsius Temperature" + celsius);
/** Converts from Celsius to Fahrenheit*/
public static double celsiusToFahrenheit(double celsius)
fahrenheit = (9.0 / 5) * celsius + 32;
system.out.println("The Fahrenheit Conversion Temperature is" + fahrenheit);
I figure that once i get the code right i can add the columns and rows but this, sadly won't even compile. I'm new, so when you answer, try to explain why I need to do it like you say aswell please.
Thanx

Since I never had the chance to go to college and I have only been programming java for about 4 days i thought I would take a crack at the problem. This is what I came up with. Sorry i have not yet learned how to properly format numbers for output.
import java.util.Scanner;
public class FCtemp {
//Celsius to Fahrenheit and Back
    static double fahrenheit;
    static double celsius;
    public static void main(String[] args) {
//Variable
        Scanner sc = new Scanner(System.in);
        System.out.print("Please Enter the Fahrenheit Temperature: " );
        fahrenheit = sc.nextDouble();
        System.out.print("Please Enter the Celsius Temperature: ");
        celsius = sc.nextDouble();
        System.out.println("--------------------------------------");
        fahrenheitToCelsius(fahrenheit);
        celsiusToFahrenheit(celsius);
    /** Converts from Fahrenheit to Celsius*/
    static void fahrenheitToCelsius(double f) {
        double c = ((f - 32.0)/9.0)*5.0;
        System.out.println(f + " Fahrenheit == " + c + " Celsius");
    /** Converts from Celsius to Fahrenheit*/
    static void celsiusToFahrenheit(double c) {
        double f = ((9.0 / 5) * c) + 32;
        System.out.println(c + " Celsius    == " + f + " Fahrenheit");
}Edited by: metron9 on Sep 27, 2007 6:08 PM

Similar Messages

  • I am on windows 7 and I upgraded to 10.0.2 and now it will not open. I have removed firefox completely and uploaded it again and that did not work. So my latest attempt I removed firefox 10 again and uploaded the beta version and once again nothing.

    I am on windows 7 and I upgraded to the newest verison of firefox and now it will not open. I have removed firefox completely and uploaded it again and that did not work. I then made sure it could get through my firewall and that did not work. So my latest attempt I removed firefox 10 again and uploaded the beta version hoping that would do it and once again nothing. It will not open at all. Please help - is there a live chat or a number to talk to someone at Firefox?

    I think when uninstalling you may also have to choose (tick) to delete the preferences and other personal data like the bookmarks, stored passwords etc. to erase completely. If you are installing afresh, please try right-clicking on the file and '''Run as administrator''' to install. And when uninstalling, please also make sure choose to delete all data and also manually delete any '''Mozilla''', '''Mozilla Firefox''' or '''Firefox''' from %appdata%, %localappdata% and %programfiles%. You can open a location by typing for eg. %appdata% in the '''Run''' box (Windows key + R). You may also have to check the '''VirtualStore''' folder in %localappdata%. Files in the VirtualStore can be problematic. I think a clean installation may help.
    [https://www.mozilla.org/en-US/firefox/new/ Firefox]
    [http://kb.mozillazine.org/Installation_directory Installation Folder]
    [http://kb.mozillazine.org/Profile_folder Profile Folder]
    Please note that using system restore would usually damage the Firefox installation.

  • Deactivating from a computer that is not working.

    So I just purchased an new computer to replace an old one that is not working. (I was due for an upgrade so I didnt bother trying to repair it) I need to install my CS6 to my new laptop, but I first need to deactivate the programs from the old computer. Th only issue is that computer won't even bring me to start screen. It just turns on and stays black, but lit. SO, I would like to know if there is anyway to deactivate my software from my old computer to let me install it on my new, without sending my old laptop to get repaired.
    Thank you for your time.

    Call Adobe Customer Support in your country and get them to deactivate it.

  • I bought a new iphone in miami that does not work, how can i get it repaired by apple?

    I live in Argentina. I bought a new iphone 3gs unlocked on January 20th, 2012, in Aventura Mall in Miami, Florida. I arrived in Buenos Aires last Saturday, 28th, turned it on, and it never worked. It shuts down, and freezes for long periods of time, strange things appear on the screen, basically, it DOES NOT WORK AT ALL.
    I want to give it back, and get my money back, but there's no contact mail, or telephone I can call from Argentina. There are only 1-800 telephone numbers which I cannot use from here. Also, there is no official Apple Store or Repair Centre here in Buenos Aires.
    I call to the Aventura Apple Store and a machine answers me, and does not re-direct my call to a repair centre or support centre.
    I find no way to contact Apple regarding my problem. It seems I could only contact them if I lived in USA.
    I can't believe I have bought an Apple product that does not work, and that I cannot claim to anybody. I have no way of asking for a replacement.
    Thanks for your help.

    dologimenezzapiola wrote:
    I call to the Aventura Apple Store and a machine answers me, and does not re-direct my call to a repair centre or support centre.
    I find no way to contact Apple regarding my problem. It seems I could only contact them if I lived in USA.
    This is the way of Apple all over the world, Their toll free telephone numbers for AppleCare support are all country specific.  Apple does not provide an international support number anywhere.
    http://support.apple.com/kb/HE57

  • I am trying to log into my apple account and it is telling me my account is disabled.  How can i get it enabled again?  I have tried resetting my password and that did not work.

    I have tried to log into my apple account so I can download my songs onto my iPhone.  It keeps telling me my apple id is disabled.  I've tried resetting my password but that did not work.  How can I fix this?

    After resetting your password you might then need to log out of your account on your device by phone on your id in Settings > Store (Settings > iTunes & App Stores if it's on iOS 6) and then log back in so as to 'refresh' the account on it
    If that doesn't fix it then you might need to contact iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • HT1904 How can I get a refund for apps in the apple App Store that do not work and are not what they said they wer

    How can I get a refund for apps in the apple App Store that do not work and are not what they said they wer

    You've tried deleting and redownloading them and seeing if they then work and tried contacting the developers ? If you have and they can't/won't help then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Is there a way to separate raw files from jpegs that are in one folder after downloading from camera when you shoot both together. I tried arrange or sort  by kind but that does not work. It arranges all folders but not the files in the folder., Is there

    Is there a way to separate raw files from jpegs that are in one folder after downloading from camera when you shoot both together. I tried arrange or sort  by kind but that does not work. It arranges all folders but not the files in the folder., Is there a way to separate raw files from jpegs that are in one folder after downloading from camera when you shoot both together. I tried arrange or sort  by kind but that does not work. It arranges all folders but not the files in the folder.

    Bridge will do the job. View > Sort > ByType. Then you can choose a group of one type and put the files in a separate folder.

  • I have changed my Apple ID name and I want to change it on iCloud, however I am not able to delete the previous account because I need to turn off the Find my iPhone - and for that I need to log in with the old name and that is not working. Help anyone?

    I have changed my Apple ID name and I want to change it on iCloud, however I am not able to delete the previous account because I need to turn off the Find my iPhone - and for that I need to log in with the old name and that is not working. Help anyone?

    Hey tulgan,
    This link will provide information on what to do after you change your Apple ID:
    Apple ID: What to do after you change your Apple ID
    http://support.apple.com/kb/HT5796
    Welcome to Apple Support Communities!
    Take care,
    Delgadoh

  • Safari 5.1.1 I no longer have access to my bookmark folders, just a search that does not work well. How can I retrieve access to bookmark folders?

    OS 10.6.8 Safari 5.1.1 I no longer have access to the bookmark folders. There is just a search function that does not work well. Is there any way to get access back to my bookmark folders?

    This site didn't say anything about one wrong ID, but only talks about changing the Apple ID.  If it didn't work the first time why should it work now?

  • HT1222 I just installed this update and now I cannot access "Mail" at all.  I tried reinstalling the program, but that does not work, either.  Help!!!!!!

    I just installed this update and now I cannot access "Mail" at all.  I tried reinstalling the program, but that does not work, either.  Help!

    Paldeng, thanks for the suggestion.  I've done all that.  I can connect to the server, but apparently they are not recognizing my ID and password.  I can use the server program if I don't go through Mail (using the same ID and password).  My mother in another state with another provider has had the same email issue, as also my husband on his laptop who uses the same internet connection I do.  His worked fine until we had it repaired at the Apple store and all the original programs reloaded (with the required updates, I assume).  We can receive email in Mail, we just cannot send.
    I contacted my service provider, and we went over my connections.  They said it was not their problem and connected me with Apple, resulting in a charge to me because my warranty is long expired.  Apple swears it is not their problem, it is the provider, so here I sit.  My son was able to fix my Mom's Mail (she's 97) and got my husband's working also, until mine went out, by tweaking connection descriptions and ports remotely.  The thing is, we had not messed with any of those settings, so what changed?  I just did not want to bother my son again, as he has many other demands on his time.
    Since this fiasco with the Mail v4.6 update, I'm wondering if something else was updated that works well with Lion and Mountain Lion, but does not work well with Snow Leopard and Leopard.  I think the problem I had with the Mail update was that my Mail program had been renamed to Mail (original), and therefore was not being recognized by the update.  Perhaps they had another tweak in there somewhere that is affecting outgoing mail connections?

  • I have Dreamweaver cs5.5 on a computer that is not working. Can I download a trial on my new laptop?

    I have Dreamweaver cs5.5 on a computer that is not working and in the shop. Can I download a trial dreamweavercs6 on my new laptop with the intention of upgrading when I get my desktop back?

    You are welcome to utilize the trial for up to 30 days.   There is not a requirement that you need to purchase the software.
    You may also want to post in the Dreamweaver forum to see if there will be any compatibility issues if you do decide to return to Dreamweaver CS5.5.  You can find the Dreamweaver forum at http://forums.adobe.com/community/dreamweaver.

  • How can I deactivate photoshop on a computer that is not working any more?

    How can I deactivate photoshop on a computer that is not working any more?

    Contact Adobe customer service:
    http://helpx.adobe.com/contact/
    Ken

  • HT1688 I have a speaker that is not working

    It has been less than a year and I have a speaker that is not working on my phone. How do I get this problem resolved?

    If you are referring to the speaker at the bottom of the phone, there is 1 speaker, one microphone. Otherwise contact Apple for repair or replacement under warranty.

  • I bought yesterday my macbook pro and I want to join the FaceTime and I just can´t... It said that is not working and try it later... but since yesterday said that .. What should I do?

    I bought yesterday my macbook pro and I want to join the FaceTime and I just can´t... It said that is not working and try it later... but since yesterday said that .. What should I do?

    Here's a previous discussions that seems to have solved a similar issue in the past:
    https://discussions.apple.com/message/12209861#12209861

  • I have a 4th gen iPod touch and I can not connect to the Internet even though my iPad works and my computer let's me get into the Internet. It gives me a message cannot to server. Please help I have tried to reset it but that does not work

    I have a iPod touch 4th gen. And I cannot get into the Internet I get a message that say cannot connect to server. The other computer and my iPad still work with the Internet . I have reeked to reset it but that does not work. Please help me.

    I do not know wat "reeked to reset" means.
    Try the following:
    - Reset the iPod. Nothing will be lost
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears
    - Power off and then on your router.
    - Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections

Maybe you are looking for

  • Framemaker 8 to PDF

    Hi, In my current project, I need to design a page , which when I open in Acrobat PDF version, shows links to all the user guides. Consider that I have three user guides which are contained in three separte books. In other words, I have three book fi

  • How to deal with two tables in the Data Base

    Hi Experts, IF WE WANT TO GET THE DATA FROM THE TWO TABLES, WHAT QUERY SQL STATEMNET SHOULD HAVE TO WRITE AND ANY CONFIGURATION CHANGES NEED TO BE DONE AND WHAT SETTINGS NEED TO BE DONE IN THE ESR . PLEASE EXPLAIN ME ON THIS . THANKS IN ADVANCE. RAM

  • Loading a combobox with data from a different domain

    I have filled in a combobox with values from an .asp page and have used it successfully. The problem is that if the flash file is ran from a different domain from the load location, the combobox doesn't get filled in (as apposed to the error if I ran

  • Business components Clob

    I tried to modify a query for a View Object. The modification is just adding a property in the SELECT. I tried to modify the query manually or by using the Query Builder. I have an exception that I don't understand: Business Components: Java type jav

  • Oracle Forms Application Development

    Hi, Hope l find you well. l am fairly new to the oracle platform and my company is still on forms 6i. l have, however managed to install database 11g2. My challenge is that l now want to design a small system that members of staff in the IT Dept can