added ex3 of R programming language