I need to write a program that prints the avg of real numbers, but the input can also include special characters like upper case letters and "," or "_" instead of ".". For example: if the user inserts the letter "S" I should convert it to "5". The input ends when "E" is inserted.
I'm trying for a week to write the code for it but I'm stuck! I can go from the char to the numbers but the numbers do not match the input or I get garbage! Attached is my code. most of it is in comments because I get stuck when I run it (no errors...). The limitations are: only 89 C code, no loops and arrays are allowed!
If anyone can direct me, please help me to understand what am I doing wrong??
Thank you!! Code link
Aucun commentaire:
Enregistrer un commentaire