Flow of Control
[SET – 3]
1 
Write a program to print following : solution  

i) 
********** 
ii) 
* 

iii)  *

iv)  * *** ***** ******* ********* 


v) 
1 
vi) 
1


2 
Write a program to compute sinx for given x. The user should supply x and a positive integer n. We compute the sine of x using the series and the computation should use all terms in the series up through the term involving x^{n} sin x = x  x^{3}/3! + x^{5}/5!  x^{7}/7! + x^{9}/9! ........ solution 

3 
Write a program to compute the cosine of x. The user should supply x and a positive integer n. We compute the cosine of x using the series and the computation should use all terms in the series up through the term involving x^{n} cos x = 1  x^{2}/2! + x^{4}/4!  x^{6}/6! ..... solution 











