18.Programming Assignment 4( using loops)
Try the Following Programs using loops 1)Print the even numbers between 0 and 50 (use while) 2)Print the odd numbers between 0 and 50 in the reverse order ( use while) 3)Print the series 5,10,15,….,100 (using for loop) 4)Generate the series 1 2 4 7 11 16....n ( use while...read n) 5)Generate the Fibonacci series 0 1 1 2 3 5 8…..n ( use while..read n) 6)Find the factorial of a number ( use for statement do not use built in factorial() function) 7)Print the powers of a number upto 10th power. ( Eg: if n=2 then the program should print 2**0, 2**1, 2**2,2**3,…..,2**10 use for loop) 8)Print the multiplication table of a given number. ( use while) 9)Print the numbers from 1 to 10 and their natural logarithms as a table ( use for) 10)Find the sum of the digits of a number.( use while-university question) 11)Check whether the given 3 digit number is an Armstrong number. (use while Eg:153,370,371,407) 12)Find the factors of a number ( use for) 13)Check whether the given number is prime or not ...