Problem Solving Through Programming in C Week 5: Programming Assignments Jan-Jun 2022

  NPTEL PROGRAMMING ASSIGNMENTS


Problem Solving Through Programming in C

Week-05 Problem-01

Due Date of Submission 2022-03-03, 23:59 IST
Write a C program to count total number of digits of an Integer number (N).


#include <stdio.h>
int main()
{
int N; 
scanf("%d",&N);



 

 


Week-05 Problem-02

Due Date of Submission 2022-03-03, 23:59 IST
Write a C program to find sum of following series where the value of N is taken as input
 1+ 1/2 + 1/3 + 1/4 + 1/5 + .. 1/N



#include<stdio.h>
int main()
{
int N;
float sum = 0.0;
scanf("%d",&N);


 

 


Week-05 Program-03

Due Date of Submission 2022-03-03, 23:59 IST
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

*****
****
***
**
*




#include<stdio.h>
int main()
{
int N;
scanf("%d", &N);



 

 


Week-05 Program-04

Due Date of Submission-03, 23:59 IST

Write a C [rogram to find sum of following series where the value of N (odd integer number) is taken as input

2





#include<stdio.h>
int main()
{
int n, sum=0;
scanf("%d",&n);

 

 


Post a Comment (0)
Previous Post Next Post