vendredi 11 septembre 2015

Write a program to find whether the given string is Lucky or not using functions

Write a program to find whether the given string is Lucky or not.

A string is said to be lucky if the sum of the ASCII values of the characters in the string is even.

Function specifications:

  • int checkLucky(char * a)
  • The function accepts a pointer to a string and returns an int.
  • The return value is 1 if the string is lucky and 0 otherwise.


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire