0% found this document useful (0 votes)
34 views1 page

Subject: Programming For Problem Solving Lab Programs For Lab 3

The document provides instructions for 10 programming problems to solve for a programming lab, including writing programs to calculate the sum of natural numbers up to n, sum of digits in a number, reversing a number, calculating a factorial, checking for prime and Armstrong numbers, printing Fibonacci series, and printing various numeric patterns.

Uploaded by

Sumit Aarti Sar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views1 page

Subject: Programming For Problem Solving Lab Programs For Lab 3

The document provides instructions for 10 programming problems to solve for a programming lab, including writing programs to calculate the sum of natural numbers up to n, sum of digits in a number, reversing a number, calculating a factorial, checking for prime and Armstrong numbers, printing Fibonacci series, and printing various numeric patterns.

Uploaded by

Sumit Aarti Sar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Subject: Programming for Problem Solving Lab

Programs for Lab 3

1. Write a C program to find sum of all natural numbers between 1 to n.


2. Write a C program to calculate sum of digits of any number.
3. Write a C program to enter any number and print its reverse.
4. Write a C program to enter any number and calculate its factorial.
5. Write a C program to check whether a number is Prime number or not.
6. Write a C program to check whether a number is Armstrong number or not.
7. Write a C program to print Fibonacci series up to n terms.
8. Write a C program to print the following pattern :
*
**
***
****
*****

9. Write a C program to print the following :


1
12
123
1234
12345

10. Write a C program to print the following :


54321
4321
321
21
1

You might also like