Challenge

+1 J show · February 14, 2015
Write a program that reads alphanumeric characters from the keyboard, and computes the average ascii value of the alpha numeric characters, the average alphabetical character, the average numeric character and the average uppercase character. Outputting each, you program should terminate reading once it read a non-alphanumeric character.


How would you guys go about doing this problem?
using ctype.h and isalnum?

Post a Reply

Replies

- page 3
Oldest  Newest  Rating
0 J show · February 17, 2015
if((value_character >= 'A' && value_character = 'a' && value_character 

I think that should fix it?
0 J show · February 17, 2015
if((value_character >= 'A' && value_character <= 'Z') || (value_character >= 'a' && value_character <= 'z'))
0 Lazar Bulic · February 17, 2015
Yup that is the solution, gj man :)

C

107,239 followers
About

One of the most popular languages of all time.

Links
Moderators
Bucky Roberts Administrator