NPTEL Problem Solving Trough Programming In C Week 5 Programming Assignment | NPTEL Swayam Assignment Answers
Q.2: Write a C program to find sum of following series where the value of N is taken as input
Code:
Code:
1+ 1/2 + 1/3 + 1/4 + 1/5 + .. 1/N
Code:
Q.3: Write a C program to check whether the given number(N) can be expressed as Power of Two (2) or not.
For example 8 can be expressed as 2^3.
Q.4: Write a C program to print the following Pyramid pattern upto Nth row. Where N (number of rows to be printed) is taken as input.
For example when the value of N is 5 the pyramid will be printed as follows
*****
****
***
**
*
0 Comments