Results 1 to 2 of 2

Thread: Convert C++ Program to Java Code!! Please help

  1. #1
    Join Date
    Apr 2012
    Posts
    3

    Convert C++ Program to Java Code!! Please help

    I have this Code that i want to convert it to Java Please help me Thanks in Advance!!

    #include<stdio.h>
    #define tax 1.0825
    #define TV_price 400.00
    #define VCR_price 220.00
    #define Remote_Controller_price 35.20
    #define CD_Player_price 300.00
    #define Tape_Recorder_price 150.00

    int main()
    {
    int TV, VCR, Remote_Controller, CD_Player, Tape_Recorder;
    float price, subtotal, total, extTV=0, extVCR=0, extRemote_Controller=0, extCD_Player=0, extTape_Recorder=0, tax_deduct;

    printf("How Many TVs Were Sold?: ");
    scanf("%d" ,&TV);

    printf("How Many VCRs Were Sold?: ");
    scanf("%d" ,&VCR);

    printf("How Many Remote Controllers Were Sold?: ");
    scanf("%d" ,&Remote_Controller);

    printf("How Many Cd Players Were Sold?: ");
    scanf("%d" ,&CD_Player);

    printf("How Many Tape Recorders Were Sold?: ");
    scanf("%d" , &Tape_Recorder);


    extTV = TV * TV_price;
    extVCR = VCR * VCR_price;
    extRemote_Controller = Remote_Controller * Remote_Controller_price;
    extCD_Player = CD_Player * CD_Player_price;
    extTape_Recorder = Tape_Recorder * Tape_Recorder_price;





    subtotal = extTV + extVCR +extRemote_Controller +extCD_Player + extTape_Recorder ;
    tax_deduct= tax*subtotal;
    total = subtotal + tax_deduct ;




    printf("\nQTY DESCRIPTION UNIT PRICE TOTAL PRICE ");
    printf("\n=== =========== ========== =========== ");

    printf("\n%d TV 400.00 %.2f " , TV , extTV );
    printf("\n%d VCR 220.00 %.2f " , VCR , extVCR);
    printf("\n%d Remote Controller 35.20 %.2f " , Remote_Controller , extRemote_Controller);
    printf("\n%d CD PLayer 300.00 %.2f " , CD_Player , extCD_Player );
    printf("\n%d Tape Recorder 150.00 %.2f " , Tape_Recorder , extTape_Recorder );

    printf("\n ----------- " );
    printf("\n SUBTOTAL %.2f " , subtotal);
    printf("\n TAX %.2f " , tax_deduct);
    printf("\n TOTAL %.2f " , total);



    getche();

    }
    Last edited by jessesaini; 18-04-2012 at 10:41 PM.

  2. #2
    Join Date
    Apr 2012
    Posts
    3

    Re: Convert C++ Program to Java Code!! Please help

    Please help !!

Similar Threads

  1. pls convert this c++ to java code
    By xSim21 in forum Software Development
    Replies: 4
    Last Post: 26-03-2012, 06:32 PM
  2. Convert C++ code into JAVA
    By Macario in forum Software Development
    Replies: 6
    Last Post: 13-11-2011, 07:36 PM
  3. Need help to convert c++ to java code program
    By xSim21 in forum Software Development
    Replies: 2
    Last Post: 27-11-2010, 04:42 PM
  4. convert C++ program in Java code
    By vaibhavsri in forum Software Development
    Replies: 7
    Last Post: 16-07-2010, 10:08 AM
  5. How can I convert my java program to an .exe file?
    By Baran in forum Software Development
    Replies: 3
    Last Post: 02-03-2009, 07:04 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,300,869.06535 seconds with 17 queries