Internship Program
(Problem Solving with C)
Assignments
Assignment -2
● Accept any number from the user. Display whether the
number is divisible by 100 or not.
● Accept a month in digit from the user. Display the month in
words. If number is not between 1 and 12 display message
“Invalid Month”. (Use ‘switch’)
● Display all prime numbers between 50 and 150.
● Write a C function that will accept a quadrilateral as a
parameter and classify it whether it is a
A Square. A Rhombus. A Rectangle.
● Following is the menu to be displayed to the user. On
selecting a choice display appropriate result. Number should
be accepted from the user.
Menu
1. Prime Factors
2. Leap Year
3. Sum of all digits
4. Number in reverse order
● Write a program to obtain sum of the first 10 terms of the
following series for any positive integer value of X : X +X3
/3! +X5 /5! ! +X7 /7! + …
Write a program that accepts an input integer ‘n’ in the range 3-9
inclusive, and display the following pattern on a cleared screen.
Sample input for n=3 Sample input for n=4
Sample output Sample output
3 4
2 3 2 3 4 3
1 2 3 2 1 2 3 4 3 2
2 3 2 1 2 3 4 3 2 1
3 2 3 4 3 2
3 4 3
4