You are on page 1of 2

PSCP LAB EVALUATION

Continuous Assessment : 15 Marks


Quiz Test: : 10 Marks
Skills Test (Mid Evaluation) : 25 Marks
End Exam : 50 Marks
Duration : 3 weeks(on or before 27/01/2017)
ASSIGNMENT-1(PSCP LAB Sections G-N)
1. Any character is entered through the keyboard; write a program to determine whether the
character entered is a capital letter, a small case letter, a digit or a special symbol.

2. If the three sides of a triangle are entered through the keyboard, write a program to check
whether the triangle is isosceles, equilateral, scalene or right angled triangle

3. Write a program to accept three numbers and display the following menu 1.Product 2.Smallest
number 3.Middle number 4.Biggest number. Accept user choice and display the related output.

4. The central library of NIT Warangal charges a fine for every book returned late. For first 7 days
the fine is one rupee, for 7-14 days fine is two rupees and above 14 days fine is 5 rupees. If you
return the book after 30 days your membership will be cancelled. Write a program to accept the
number of days the member is late to return the book and display the fine or the appropriate
message.

5. There are three different faculty positions in an educational institute, namely, Professor,
Associate Professor and Assistant Professor. The total number of faculties in the organization is
150. The salary structures for different faculty positions are different. A Professor gets Rs
40,000/- basic pay (per month) with 55% dearness allowance (DA), 30% house rent allowance
(HRA) and 10% medical allowance (MA). An Associate Professor gets Rs 30,000/- basic pay
(per month) with 50% DA, 25% HRA and 10% MA. An Assistant Professor gets Rs 20,000/-
basic pay (per month) with 45% DA, 20% HRA and 10% MA. Furthermore, a lady faculty will
get 5% travelling allowance. Write a program to display the gross salary (total salary) of each
faculty in the institute. Use a switch statement to decide or select a given faculty position.

6. In a company, worker efficiency is determined on the basis of the time required for a worker to
complete a particular job. If the time taken by the worker is between 2 3 hours, then the
worker is said to be highly efficient. If the time required by the worker is between 3 4 hours,
then the worker is ordered to improve speed. If the time taken is between 4 5 hours, the
worker is given training to improve his speed, and if the time taken by the worker is more than
5 hours, then the worker has to leave the company. Write a program that calculates the
efficiency of worker by taking the time taken by the worker from console.

7. Write a program to compute the interest due, total amount due, and the minimum payment for a
revolving credit account. The program accepts the account balance as input, then adds on the
interest to get the total amount due. The rate schedules are the following: The interest is 1.5%
on the first $1,000 and 1% on any amount over that. The minimum payment is the total amount
due if that is $10 or less; otherwise, it is $10 or 10% of the total amount owed, whichever is
larger. Your program should include a loop that lets the user repeat this calculation until the user
says she or he is done.

8. Write a program to enter the numbers till the user wants and at the end it should display the
count of positives, negatives and zeros entered.
9. Write a program to display the strong numbers within a given range where a strong number is
the sum of factorials of individual digits of that number. For example 145 is a strong number (1!
+4!+5!=1+24+120=145).

10. According to the Gregorian calendar, it was Monday on the date 01/01/1900. Write a program
to find out what is the day on 1st January of the given year.

11. A university has the following rules for a student to qualify for a degree with A as the main
subject and B as the subsidiary subject:
(a) He should get 55 percent or more in A and 45 percent or more in B.
(b) If he gets less than 55 percent in A he should get 55 percent or more in B. However, he
should get at least 45 percent in A.
(c) If he gets less than 45 percent in B and 65 percent or more in A he is allowed to reappear in
an examination in B to qualify.
(d) In all other cases he is declared to have failed.
Write a program to receive marks in A and B and Output whether the student has passed, failed
or is allowed to reappear in B.

12. A seven-digit number is entered through the keyboard. Write a program to obtain the reversed
number and to check whether the given number is palindrome or not.

13. Write a program which will read an integer N and then find the product of all the non-prime
integers from 1 to N.

14. Write a program to determine the given number is armstrong number or not.(ex: 153 is
armstrong, because 13+53+33=153)

15. The value e,cos x and sin x can be approximated by the sum
a) ex=1 + x + x 2 /2! + x 3 /3! + ... + x n / n !
b) cos x = 1 - x2/2! + x4/4! - x6/6! -.....
c) sin x = x - x3/3! + x5/5! - x7/7! + x9/9! .........
Write a program that takes a value x as input and outputs this sum for n taken to be each of the
values 1 to 100.

16. Write a program to display all the possible permutations in ascending order with digits 1, 2...n
where n is a positive integer. Ex: If n=3 then the output should be: 123,132,213,231,312,321 in
this order.

17. Write a program to produce the following output for n*n pattern.
a) A B C D E F G F E D C B A b) @ @ $ @ @ c) 1
AB C D EF F ED C BA @ $ $ $ @ 232
ABCDE ED C BA $ $ $ $ $ 34543
ABCD DCBA @ $ $ $ @ 4567654
ABC C BA @ @ $ @ @ 567898765
AB BA 4567654
A A 34543
232
1

You might also like