Posted in All Posts, Semester 1

Sem 1 – PSCP Unit 3 Programs

PSCP – Problem Solving & C Programming

Unit 3 : Using Control Statements

1. Program to input an integer n and evaluate the value of the given series – 1 + 1/2² + 1/3³ + 1/44 + … 1/nn
Download

2. Program to input a number from user until 999 is entered. Count and display count of odd and even numbers from the numbers entered.
Download

3. Program to accept an integer and generate of first n prime numbers.
Download

4. Program to input a number and display each digit in words.
Download

5. Program to display sum of digits of inputted number.
Download

6. Program to input a number n, reverse it and print it.
Download

7. Program that accepts an integer no, if the integer no = 4, then print the pyramid :

Download

8. Program that accepts an integer no, if the integer no = 4, then print the pyramid :

Download

9. Program to print the Floyd’s triangle. E.g. if number of
rows entered by the user is 4 then output is:

Download

10. Program to print the triangle, the user should input the number of rows .
E.g. The triangle below should be the output if the user enters 4.

Download

11. Program to accept a string and display the following –
a. No. of words.
b. No. of letters.
c. No. of digits.
d. No. of special characters.
Download

Download All

I hope that you found this article to be helpful.
Please share your thoughts in the Comments Section.

If you liked this article, then please like our Facebook page.

Suggested Reading

Comment your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.