WAP to find if the entered number is a prime number or not.
Hint:
A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers.
WAP to find the sum and average of the numbers entered by the user.
WAP to print Fibonacci Series till number entered by the user is reached.
Fibonacci Series is a sequence of numbers in which each number is the sum of the two preceding ones, starting from 0 and 1.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...
WAP to print the following pattern.
List of PatternsWAP to the following series where user enters the value for $n$. Also compute the value of the series.
$$ 1 + \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + ... + \frac{1}{2^n} $$