Monday, 7 March 2016

Programming Definition - CPU


1) Write a  program to display following pattern (Rectangle, arrow, rectange).
2) Write a program to display the following pattern.
x=a/b-c;
3) Write a program to convert fahrenheit to celsius and celsius to fahrenheit.
F=9C/5 + 32;
4) Write a program to display the equation of line in a form of : ax + by = c
value of a, b and c is taken from user
5) Write a program to take the input in form of rupees and paise and convert it into paise
(15.29 -= 1529 paise)
6) The price of one kg of rice is 15.25 and one kg of sugar is 20. Get the number of KG from user and display the value in following form
****List of Itemes***** 
Item                         Price
Rice                         15.25
Sugar                       20
Total                        25.25
7) Write a program to Swapping of two numbers
8) Write a program to find the simple interest
9) Write a program to read 5 subjects marks and display the percentage
10) Write a program to calculate the gross salary of employee.
11) Write a program to check number is odd or even
12) Write a program to check number is postive, negative or zero
13) Write a program to find greater number from two numbers
14) Write a program to find greater number from three numbers
15) Write a program to find Electricity bill
16) Write a program to swap the value of  two variables without using third.
17) Write a program to check year is leap year or not.
18) Write a program to find maximum number between two numbers using ternary operator
19) Write a program to perform division using shift right
20) Write a program to perform multiplication using shift left
21) Write a program to print ASCII value of a character
22) Write a program to convert lower case letter into upper case
23) Write a program to check person is eligible for vote or not
24) Write a program to display the examination result
if avg is above 80 then distinction
if avg is less than 80 and greater than 70 then first class
if avg is less than 70 and greater than 60 then second class
if avg is less than 60 and greater than 50 then pass class
if avg is less than 50 then fail
25) Write a program to display the total amount after purchasing the clothes with consideration of following details
if cloth is from mill then discount is 0%, 5%, 10% and 15% if amount is between 0-100,100-200,200-300 and above 300
if cloth is from handloom then discount is 5%,10%,15% and 20%
26) Write a program that will read the value of x and evaluate the following function
y = 4x + 100 for x<40
y=300 for x=40
y=4.5x + 150 for x<40
27) Write a program to check candidate is eligible for admission or not based on following condition
marks in maths >=60
marks in phy>= 50
marks in chem>=40
total in all 3 >=200
or total in maths & phy >=150
28) Write a program to read the value of 4 variables a,b,c and d and find the ratio of (a-b)/(c-d) and print result only if c-d is not equal to zero
29)Write a program to check employee is eligible for loan or not.En employee can apply for a loan at the beginning of every six months but he will be get the amount according to the following company rule
1) cannot get more than two loan
2) maximum permissible total loan is limited to 50000
3 loan amount need to give
if loan1 is zero then check the loan2 and loan 3 not more than 50000
if loan1 is zero check loan 2 is zero if loan 2 is not zero then check total of loan 2 and loan3 is greater than max than eligible amount is max - total
30) Write a program to print first 10 numbers
31) Write a program to print sum of first 10 numbers
32) Write a program to print 20 horizontal asterisks(*)
33) Write a program to print the sum of numbers from m to n
34) Write a program to print largest number from six number using ternery operator
35) Write a program to count total number of positive, negative and zero until -1 is entered,
36) Write a program to print day using switch case.
37) Write a program to create calculator using switch case.

No comments:

Post a Comment