Monday, June 11, 2007

An easy problem!

Try to code this easy problem:
Write a function which calculates the sum of the ASCII's code of all characters in an string. In C/C++ one may write as follows:

int Sum (char *S)
{
  int Result= 0;
  int i= 0;
  for ( S [i]!= 0; ++i)
  {
    Result+= S [i];
  }
  return Result;

}


Is it correct? Does this function produce the correct answer, always?

P.S. I love PASCAL!!??

Sunday, June 10, 2007

A Good project

Yesterday, One of my friends proposed me a project that looks interesting for me: Develop an application which is able to download and save all the posts and comments on a weblog. In second year of B.Sc, we are asked to develop a very small search engine which automatically crawls some web pages and searches on the crawled pages. I was looking for an opportunity to complete that project, and develop a small search engine which searches on some weblog providers (for example PersianBlog, Blogspot and etc).
Lets see what will happened!