This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Code conversion! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Code conversion!" Watch "Code conversion!" New topic
Author

Code conversion!

Zafar Ali
Ranch Hand

Joined: May 11, 2002
Posts: 64
Hello Ranchers.
I have a problem to convert the following code in Java.
I am disturb spcially in getche() input function.
void main()
{
char ch='a';
while(ch !='\r')
{
printf("Enter a character :\n");
ch=getche();
printf("\nThe code for %c is %d.\n", ch,ch);
}
}


Zafar <br />***Your behaviour should affect.***
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

moving this to Java In General(Beginning) seeing as though this is not certification related.
Please continue the discussion there.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Zafar, how would you describe this algorithm in pseudocode?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Code conversion!
 
Similar Threads
convert char pointer to int gives segmentation fault
How to use excel file in C program for file handeling?
C2143 error and I can't find it
Number Trick
Problem in C