Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Code conversion!

 
Zafar Ali
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
}
}
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
moving this to Java In General(Beginning) seeing as though this is not certification related.
Please continue the discussion there.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zafar, how would you describe this algorithm in pseudocode?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic