|
| ||||||||||
| Tags: convert, java, program |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Convert C++ Program to Java Code!! Please help
#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
| |||
| |||
| Re: Convert C++ Program to Java Code!! Please help
Please help !! |
![]() |
|
| Thread Tools | Search this Thread |
| |
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 |