Newbie help Temperature converter

I hva a proble with this, when I complie and then execute the file, DOS comes up (which is what I want for now) but I can't enter a number . this is what is tells me when I execute the file.
//DOS output: "Centigrade equivalent =37.0
press any key to continue..."
This is the source:
class FahrenheitToCentigrade
     double ConvertTemp ( double fahrenheit )
          double centigrade =  (double) 5/9 * ( fahrenheit - 32 );
                                 // typecast to double..why ?
          return centigrade;
     public static void main ( String[] args)
        FahrenheitToCentigrade x = new FahrenheitToCentigrade();
        double p = x.ConvertTemp(98.6 );
        System.out.println("Centigrade equivalent = " + p);
} // end of class FahrenheitToCentigrade

if you want to input a number then you can convert your existing main() to this:
import java.io.*;   //<<--- DONT FORGET TO ADD THIS!
public static void main ( String[] args){
      try{
        FahrenheitToCentigrade x = new FahrenheitToCentigrade();
           DataInputStream in = new DataInputStream(System.in); // add this....
            System.out.print("Enter temperature: ");
        double p = x.ConvertTemp(Double.parseDouble(args[0]) );  // then this.....
        System.out.println("Centigrade equivalent = " + p);
       catch(Exception e){}
}

Similar Messages

  • I need help in converting a pdf to a fillable form in my adobe

    I need help in converting a pdf to a fillable form in my adobe

    "Adobe" is a company. If you mean "Adobe Reader" then you can't (at least not easily). You need Adobe Acrobat for that.

  • Need help in converting numbers to Italian text

    Need help in converting numbers to text in Italian language. I want to knw is there any method other than SE63 to translate these text in one shot. I have tried with LSMW also (as the sheet is in XLS format ).Plz reply if anyone is aware of this ..

    hi,
    chk this code.
    CALL FUNCTION 'SPELL_AMOUNT'
    EXPORTING
    amount = amount
    currency = 'EUR'
    filler = ' '
    language = 'E'  => give the language as italian
    IMPORTING
    in_words = amountrs.
    rgds
    anver
    pls mark all hlpful answers

  • Need help in converting date format

    Hi,
    Need help in converting date format from 'DD-MON-YYYY' to 'YYYY-MM-DD' in an .rtf template as I believe xml publisher supports the date format as 'YYYY-MM-DD' only.
    Thanks,
    Raj.

    I got the same problem, anyone know how to solve this problem? I allready found some date functions on http://blogs.oracle.com/xmlpublisher/2008/09/date_functions.html . I also tried <?xdoxslt:month_name(xdoxslt:get_month(xdofx:substr(NEED_BY_DATE, 4,3)), $_XDOLOCALE), 0, 'nl-NL')?>, but then it returns a namespace error (Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'xdofx' used but not declared.). Anyone know how to fix this?
    Edited by: user11165753 on 7-dec-2009 23:50

  • Need help to convert SQL MSSQL statement to work with PL in ORACLE

    Hi All,
    I have the trigger below and it worked on MSSQL server for windown and
    I really need your help to convert this trigger to work on PL/ORACLE:
    create trigger deleteLD
         on tablea for delete
    as
    set nocount on
    begin
         declare @tablename varchar(100)
         declare @dropSql varchar(50)
         select @tablename= dataset from deleted
         set @tablename = 'LD_' + @tablename
         set @tablename = @tablename + 'UTMSTATS'
         if exists (select * from sysobjects where name = @tablename)
         begin
              set @tablename = 'drop table ' + @tablename
              EXEC (@tablename)
         end
    end
    GO
    Your help is greatly appreciated.
    Thanks,
    JP

    not sure if this is something that you want:
    Create Or Replace Trigger deleteLD
      Before Delete on tablea
    Declare
      vCtr          number := 0;
    Begin
    select count(*)
       into vCtr
       from all_tables
      where table_name = :new.tablename;
    if vCtr > 0 then
       dbms_utility.exec_ddl_statement('drop table '||:new.table_name);
    end if;
    End;note: not tested

  • WHO CAN/WILL HELP ME CONVERT FROM PDF TO WORD ?

    WHO CAN/WILL HELP ME CONVERT FROM PDF TO WORD ?

    Someone might. Are you having a problem? What have you purchased from Adobe, exactly, and where do you get stuck?

  • I want to pay someone to help me convert Pagemaker file

    I need to find someone to PAY to help me convert a Pagemaker 6.5 file to a PDF with Truetype embedded fonts.
    I have spent 35 hours trying to figure it out. Sending how-to stuff does not work. I need to PAY someone to help me fix it please.
    I have tried an amazing number of ways of trying to fix it, and nothing works.
    It is a 280 page file. It is not worth it to me to buy Indesign to convert this one file. Please help.

    I finally got the file to print out properly. I am so happy. Thank you, thank you to all of you who posted here. You were the key to my getting this to work! Here's what I learned:
    I am using Windows XP. Really!
    Pagemaker 6.5 is not good a creating a pdf with large files and particularly so if there are a lot of embedded images. I did have problems with a corrupt file because I was able to make a pdf with a simple file and then even that stopped working. Always make several backup copies of large files in case your file goes corrupt. Then you can go back to an earlier copy and start again.
    It is important to do a "Save As" with a new file name before starting to create a pdf. This simplifies and compresses the file for easier pdf creation.
    If you are starting a file from scratch that will be made into a pdf, use a Postscript font, not a TrueType font for fewer problems.
    I finally ended up buying a copy of an upgrade from Pagemaker 6.5 to Pagemaker 7.0.2 on Ebay. It had a serial number. I know there could have been problems with that but for just one file I was willing to try it. I did not want to go through the possible long reworking if I imported the file into Indesign. Especially since there may have been problems with the resolution of images. Also with Pagemaker 7 there was Acrobat Distiller 6 that I installed. Before I only had version 5.
    Open your file in Pagemaker 7: Then click on File, Export, Adobe PDF, Distill Now. 
    To check if embedded fonts in PDF: In Adobe Reader- File, Properties, Fonts.
    For any new documents where I need a PDF with embedded fonts, I am going to use Indesign. But for this one file. Buying an upgrade to Pagemaker was worth it.
    Optional: If your TrueType fonts are not embedding:
    Outside of Pagemaker set up printer (you only do this once): Go to "Start" in Windows at bottom right of screen. In right column click on "Printers and Faxes". Right click on "PDFCreator". (This printer is created by installing PDFCreator program. I am not associated with them at all. Other programs will work too for this.) Select "Printing Prefrences", then "Layout", "Advanced", "Graphic", "Download as Softfont (Truetype)". Save.
    Open Pagemaker document. In "File", "Document Setup", change printer to "PDFCreator". 
    On another topic, I think if would be nice if Adobe sold a light version of Indesign for people with simple needs. Buying a new version of Indesign for $650 for only 1 file is too much. Though as stated above they do have the online monthly program. But for people who only have occassional small needs for it a light version would be great.

  • Help with converting a Nero file

    I have previously converted a dvd insert designed with Nero into a pdf using adobe acrobat in order to send to someone else.  When I tried to do the same thing today with a new Nero designed insert the conversion wouldn't work.  The message said adobe didn't support the program that created the file.  Any ideas?

    thanks for your response.
    When I create a dvd insert or cd label etc using Nero the file extension is nct - nero cover template.  The printer wants the file as a pdf as he can't open Nero files.  I have version 9.3 of acrobat.
    Date: Mon, 18 Jan 2010 21:43:47 -0700
    From: [email protected]
    To: [email protected]
    Subject: help with converting a Nero file
    Nero is simply a CD/DVD burning application and should have no effect on the type of files that will eventually be on the CD/DVD.
    What type of files are you trying to convert and exactly how are you trying to convert them? Plus, it would help to know the version of Acrobat you are using.
    >

  • Help for converting .mov HD 1080i to HD DVD 1080i format to play on my DVD player

    HI,
    I have downloaded HD 1080i movie clip from iTunes .
    The Video Clip is a .mov file.  I can play this file on my iMac , but i need to play this file on my DVD player. 
    My DVD PLAYER  do not support the .mov file .  I need some help to convert the .mov file to a DVD format.
    I have tried some free application that converts any format of video to required format. But the converted DVD format is down graded to 480p.
    I need the same 1080i format DVD format when it is converted.
    Please suggest the Application which can convert the .mov file to DVD in 1080i
    Thanks in advance
    Regards,
    Nilesh Labde
    <Personal Information Edited by Host>

    DVD Video discs are always standard definition -- 720x480 on NTSC or 720x576 on PAL, otherwise they don't conform to the strict DVD Video specification and won't play in a DVD player.
    If you want HD, you have to make a Blu-Ray disc. You need specialized software for that such as Toast 11 Titanium or Adobe Encore (part of the CS5 or CS6 collection, not sold separately) and a Blu-Ray burner. Of course, you will also need a Blu-Ray player connected to your HD TV.

  • Please help- problems converting .mov to .avi

    I'm using QuickTime Pro to convert my .mov to .avi and when I view the .avi movie, the first couple seconds is in fast-forward mode, then a couple seconds of slow motion, then it's normal for the rest of the movie.
    To see my steps, I used this link to help me convert: http://www.divx-digest.com/articles/articlemov2avi_quicktimepropage1.html
    I'd appreciate any help on this.
    euser

    quicktime Pro will do it, get it from the apple store (its just a key, cost $30), also ffmpegX (shareware) will do it
    sometimes you can find an application that will do it by using the quicktime libraries for free, just search a site like versiontracker

  • Help in converting cfscript to cftag syntax

    Can I get some help on converting the following few lines of
    cfscript into cftag?
    <cfscript>
    planNumbers = StructKeyArray( S_New );
    for ( planNumber IN S_New ) {
    request.logger.debug("debug: planNumber: #planNumber#");
    S_Funds[ planNumber ] = structNew();
    </cfscript>

    Not sure what the exact purpose of the code would be, but
    would the following suffice? I am assuming that S_Funds is meant to
    be a structure, also, the variable planNumbers does not seem to be
    used anywhere in the original code snippet.
    <!--- Some sample data to show code result --->
    <cfset S_New = structNew()/>
    <cfset S_New["10101"] = "Floor 1 Room 1"/>
    <cfset S_New["10102"] = "Floor 1 Room 2"/>
    <cfset S_New["10103"] = "Floor 1 Room 3"/>
    <cfset S_New["10104"] = "Floor 1 Room 1"/>
    <cfset S_Funds = structNew()/>
    <cfloop collection="#S_New#" item="planNumber">
    <cfset request.logger.debug("debug: planNumber:
    #planNumber#")/>
    <cfset S_Funds[ planNumber ] = structNew()/>
    </cfloop>
    <cfdump var="#S_Funds#">
    Cheers

  • Help with Converting an Access query

    Hello:
    First time poster and would appreciate some help in converting this Access query into T-SQL so I can use in a Stored Procedure. I don't need help in resolving the syntax for the variables as parameter in the second query, but stuck in writing the first query
    in T-SQL . I assume I need some type of nested query with a left join to another query in T-SQL. 
    How do I convert this from Access into MS-SQL
    SELECT TBL_MONTH.L_Month, TBL_MONTH.L_MonthName
    FROM TBL_MONTH LEFT JOIN qry_MonthCheck ON TBL_MONTH.L_Month = qry_MonthCheck.L_Month
    WHERE (((qry_MonthCheck.L_Month) Is Null));
    qryMonthCheck in Access is defined as
    SELECT TBL_MONTH.L_Month, TBL_SIGNOFF.SO_YEAR, TBL_SIGNOFF.SO_USER, TBL_SIGNOFF.SO_LOCATION
    FROM TBL_MONTH RIGHT JOIN TBL_SIGNOFF ON TBL_MONTH.L_Month = TBL_SIGNOFF.SO_MONTH
    WHERE (((TBL_SIGNOFF.SO_YEAR)=[forms]![frm_signoff]![cboyear]) AND ((TBL_SIGNOFF.SO_LOCATION)=[Tempvars]![tmpVarUserLOC]));

    It is very much up to personal taste. For tables I use no prefix at all. Or suffix. I prefer plural: categories, products, etc. For junction tables, I drop the plural in the first entity, for instance productcategories. As for the case, many people prefer
    initial uppercase, while I go for lowercase only. But initial uppercase has its points, particularly in documentation. I am a staunch advocate of using case-sensitive collation for metadata. I don't see any point in mixing productcategories, Productcategories,
    ProductCategories etc. That can only cause confusion.
    As for either entities, I don't use views much, and I don't have any prefix for these either. In fact, several views I've been involved used to be tables once upon a time.
    If you want to add a marker to the object name, I recommend using a suffix. It is much easier to find objects in the version control system and other browser, when not everything is cluttered on the same letter. For instance, I typically add _sp at the end
    of stored procedure names.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Help to convert ver 6.1 driver to ver 6.02

    Hi all,
    Could someony help to convert the following files to LabVIEW v6.02 files?
    http://www.hameg.com/drivers.0.html?&tx_hmdownloads_pi1[mode]=download&tx_hmdownloads_pi1[uid]=2149&...
    Thanks,
    Ryan

    Here it is converted to 6.0
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011
    Attachments:
    HM8142HO88.llb ‏205 KB

  • Help with converting hex to date and time

    Hi!
    I am using snmp4j libraries to walk the mib tree. The system date is getting returned in 11 hexadecimal octets. I require help in converting it to date and time. I looked up the RFC convention of what each octets represent. Require help with conversion.
    Eg: 07:db:06:0a:29:1d:00:2b:05:1e
    Thanks,

    Octets Contents Range
    1-2 year 0..65536
    3 month 1..12
    4 day 1..31
    5 hour 0..23
    6 minutes 0..59
    7 seconds 0..60
    (use 60 for leap-second)
    8 deci-seconds 0..9
    9 direction from UTC '+' / '-'
    10 hours from UTC 0..13
    11 minutes from UTC 0..59
    For example I just took the time an hour ago it came out as
    07:db:06:13:12:11:1a:00:2b:05:1e
    I have to convert this as a date long value to send it.
    Do I have to write an utility of my own to do it?

  • Help! converting two types of video into one format so I can edit

    Right Folks, go easy because I’m a novice.
    I’m having major problems getting two different types of video to work together in final cut pro 7.
    I’ve recorded something with two different HD cameras and I’m totally aware I need to convert them to the same format so I can begin to edit them. I’ve got Mpeg stream clip, could anybody help me convert them?

    Hi Dave, one of the cameras I have is Sanyo Xacti VPC-CG10 this shoots onto 16GB SDHC class 2, to work this in final cut I'm aware I have to compress using Apple ProRes 422 Codec which works fine.
    The other Camera is a panasonic I have shoots on SDHC Class 6 cards and I usually compress at HDV 720P 25fps. which also works fine.
    I can edit both individually, the latter, the panasonic camera is simple to capture and edit and is the camera I use the most but on this particular shoot I need to use both together.
    So I think its the Sanyo that's causing me the problem.

Maybe you are looking for

  • Animated Gif on problems when published

    Hi, Can anyone help? I've imported an animated gif and used it on my stage but when I publish it it doesn't work on a webpage and says that the Gif is missing. Does anyone know how to solve this problem? Thanks

  • Passing values to different classes.

    Class A (main panel) calls Class B (calendar panel) and Class C (textbox and buttons panel). When the users changes dates on the calendar class B, class C needs to be notified of the new values. I have two constructors in class C...an empty parameter

  • My toolbars are mostly empty. What happened? How do I restore the original settings?

    My toolbars are mostly empty. What happened? How do I restore the original settings?

  • Urgent Help~~ some error

    The code is like that System.out.println("3. Average CGA per teacher:"); for (int i=0;i<a.length;i++) Person s = (Person) a; String id=""; if (s instanceof Teacher) System.out.print("\t"+s.fname +" "+ s.lname +":"); id = (((Teacher)s).gettid()) ; dou

  • Somebody Please provide the answers for FAQs posted in Wiki

    Hi Gurus and Experienced Senior members, Thanks a lot for the support provided by all of you.You guys posted a lot of important questions on Wiki. Can somebody take the effort and provide the answers for the same so that it would be helpful to all th