This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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]
 
 
subject: Code conversion!
 
Similar Threads
C2143 error and I can't find it
Number Trick
Problem in C
How to use excel file in C program for file handeling?
convert char pointer to int gives segmentation fault