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

Programming On C Lab Assignment 4: Last Date of Submission: Sunday, March 10,2019

This document outlines 23 programming assignments for a C programming lab due on March 10, 2019. The assignments include writing programs to generate sequences like the first 10 natural numbers using different loops; finding the sum of the first n even numbers, first n natural numbers, and the cubes of the first 10 natural numbers; calculating factorials, digit sums, and reversing numbers; checking for prime and Armstrong numbers; generating multiplication tables, sequences, pyramids of numbers, and figures; calculating powers; and finding sums of series.

Uploaded by

Bishal Shahi
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)
41 views1 page

Programming On C Lab Assignment 4: Last Date of Submission: Sunday, March 10,2019

This document outlines 23 programming assignments for a C programming lab due on March 10, 2019. The assignments include writing programs to generate sequences like the first 10 natural numbers using different loops; finding the sum of the first n even numbers, first n natural numbers, and the cubes of the first 10 natural numbers; calculating factorials, digit sums, and reversing numbers; checking for prime and Armstrong numbers; generating multiplication tables, sequences, pyramids of numbers, and figures; calculating powers; and finding sums of series.

Uploaded by

Bishal Shahi
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

Programming on C

Lab assignment 4
Last date of submission: Sunday, March 10,2019
1. Write a program to generate first 10 natural numbers using for loop.
2. Write a program to generate first 10 natural numbers using while loop.
3. Write a program to generate first 10 natural numbers using do-while loop.
4. Write a program to generate first ‘n’ even terms and find their sum also.
5. Write a program to find sum of first ‘n’ natural numbers.
6. Write a program to find sum of cube of first 10 natural numbers.
7. Write a program to display the first 10 terms of series 1, 5, 9, …
8. Write a program to find the factorial of a given number.
9. Write a program to find the sum of digits of a given number.
10. Write a program to find the reverse of a given number.
11. Write a program to check whether given number is prime or not.
12. Write a program to print all the prime numbers between 1 to 100.
13. Write a program to count total numbers of prime number between 1 to given number ‘n’.
14. Write a program to display the first ‘n’ terms of Fibonacci series.
15. Write a program to check whether given number is Armstrong or not.
16. Write a program to display multiplication table up to ‘n’ as:
1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30

17. Write a program to display the following output:


A B C D E F G H I J
18. Write a program to display the following output:

1
12
123
1234
12345

19. Design the layout of chess board using nested loop. [hint use ASCII 219 for white and 255 for black square
box]
20. Write a program to generate the pyramid of number as
1
121
12321
1234321
123454321
21. Write a program to generate the following figure:
*
***
*****
*******
22. Write a program to find the value of given base to the given power. [y=a b]
23. Write a program to find the sum of following series:
1 1 1
a) + + +… upto 10th terms
12 32 52
b) 11+22+33+… upto nth terms
c) 11+22+33+44+…. Upto nth terms

You might also like