Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



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

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 18-04-2012
Member
 
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.
Reply With Quote
  #2  
Old 24-04-2012
Member
 
Join Date: Apr 2012
Posts: 3
Re: Convert C++ Program to Java Code!! Please help

Please help !!
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Convert C++ Program to Java Code!! Please help"
Thread Thread Starter Forum Replies Last Post
pls convert this c++ to java code xSim21 Software Development 4 26-03-2012 06:32 PM
Convert C++ code into JAVA Macario Software Development 6 13-11-2011 06:36 PM
Need help to convert c++ to java code program xSim21 Software Development 2 27-11-2010 03:42 PM
convert C++ program in Java code vaibhavsri Software Development 7 16-07-2010 10:08 AM
How can I convert my java program to an .exe file? Baran Software Development 3 02-03-2009 06:04 PM


All times are GMT +5.5. The time now is 07:19 AM.