Use either "what did you get?" if you are hoping your friend will tell you his exact mark, or "how did you do?" if you want a more general answer (pretty well, not very well, etc.)
Good point Khoff. I was going to add to mine "But be prepared to hear 'None of your business!' because not everyone would share that information." But I think Khoff's alternative is a far better way to ask!