+ 1

please make a program in c language char sum

here we have to input a string let's say abc now every character has some weight like a=1 b=2 .....z=26 so the output should be a+b+c which is equal to 5 how to do this?

1st Sep 2019, 4:39 AM
AAYUSH PAGARE🇮🇳
AAYUSH PAGARE🇮🇳 - avatar
3 Réponses
+ 1
for every letter: total += letter-'a'+1
1st Sep 2019, 11:29 AM
Miquel Andreu Fuster Sancho
Miquel Andreu Fuster Sancho - avatar