![]() |
convert c code to a java code
hi.. i'm new in java and i'm not that familiar with the new things in java.. can you help me with this?
i have this c code and i want to have it in java, and i have NO idea what to do coz i don't know what are the equivalents of the built-in methods in c with the built-in methods in java.. thanks a lot.. :
#include <iostream.h>the code above does this task: it opens a txt file and then does this.. Sample Input 8 //test cases or the # of lines to be changed (a+(b*c)) ((a+b)*c) (a*(b*c)) (a*(b/c)*d) ((a/(b/c))/d) ((x)) (a+b)-(c-d)-(e/f) (a+b)+(c-d)-(e+f) Sample Output a+b*c (a+b)*c a*b*c a*b/c*d a/(b/c)/d x a+b-(c-d)-e/f a+b+c-d-(e+f) can you help me with this.. |
help pls.. thanks
|
Why don't you find a book on Java and start from there!!
|
Why do you want this code in Java? Is this an assignment?
|
Start here and then, as you learn, try to convert your program. It will help you learn Java in the process.
|
There is no automatic conversion method. Java is based on objects & methods/actions you can take on those objects, the interaction of objects, etc, whereas C is based on data and manipulating data using functions. Basically, I'm saying the same as everybody else: you're going to have to learn some Java before you can 'convert' your program, because the two languages are different, although they may have similar features.
|
| All times are GMT -5. The time now is 2:55 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC