• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ascii to Decimal - Eating my Brain. Urgent please

 
Rajesh Kumar
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends
I am facing pblm while converting ascii to dec.
at present my program is supporting to this..
ascii dec
a 61
but, when i give "aa" it is still saying 61 as decimal.
how can i make my program to get this type of result
aa 6161
aaa 616161
is it possible.
please help me.
Thanks in advance
Yours
Rajesh
 
Junilu Lacar
Bartender
Pie
Posts: 7465
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Based on the information you have given, you are doing two things wrong:
1. ASCII('a') is 97, not 61
2. You don't have a loop to process each character in a string
Post some code and we'll tell you exactly where you're doing it wrong (and don't forget to use the little Instant UBB Code "Code" button below the "Add Reply" button when you reply)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic