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

Computer Project: Programming Exercises

The document outlines a half-yearly project for Class IX Computer students at Lalji Mehrotra Lions School. It includes ten programming tasks that cover various concepts such as conditional operators, calculations for geometric shapes, digit manipulation, and user input handling. Each task provides examples and expected outputs to guide students in their programming assignments.

Uploaded by

vishweshvpatel
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Computer Project: Programming Exercises

The document outlines a half-yearly project for Class IX Computer students at Lalji Mehrotra Lions School. It includes ten programming tasks that cover various concepts such as conditional operators, calculations for geometric shapes, digit manipulation, and user input handling. Each task provides examples and expected outputs to guide students in their programming assignments.

Uploaded by

vishweshvpatel
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lalji Mehrotra Lions School

Managed By: Karnavati Lions Education Foundation


Class : IX Subject: Computer
Half Yearly Project work

1. Write a program to find the maximum of three numbers using a conditional operator.
2. Write a program to find the surface area of a rectangular prism.
Formula of prism= 2ab+2bc+2ac
Where a,b and c are the lengths of three sides.
3. Write a program to find the sum of digits of a number entered by user.
Example: Input : Enter a number to find sum of its digit : 457
Output : The sum is 16 (4+5+7)
4. Write a program to accept a two-digit number. Add the sum of its digits to the product of its digits. If the value is
equal to the number input, output the message “ Special 2-digit number” otherwise “ Not a special 2-digit number”.
Example: Input : Enter a number:59
Sum of digits= 5+9=14
Products of its digits = 5 * 9= 45
Sum of the sum of digits and product of digits = 14 +45 = 59
Output : Special 2-digit number
5. Write a program to check whether a number X is divisible by a number Y or not.
Example: Input : Enter value of X : 150
Enter value of Y : 5
Output : 150 is divisible by 5.
6. Write a program to input Passenger’s name, Age ,City , Code of Bus and distance in KM . Calculate Total fair
according to the code of a bus given below :
Code Fair
D 15 ₹
R 20 ₹
W 30 ₹
C 40 ₹
Display All the information with proper formatting as output.
7. Write a program to input Student’s name, Class ,City and Percentage . Find the Grade according to the given
criteria :
Percentage Grade
80 – 100 A
65-79 B
50-64 C
40-49 D
< 40 E
Display all the information with proper formatting as output.

8. Write a program to enter your age and using nested if condition, check the following :
 If age < 18 then print “ You are Minor and not eligible to vote “.
 If age >=18 and age <= 60 then print “You are young and eligible to vote”.
 Otherwise print “You are a senior citizen person given special care to vote “.
9. Write a program to input a number and check whether it is a Buzz number or not.
A number is said to be Buzz number if it ends with 7 or is divisible by 7.
Example : Input : Enter a number : 1007
Output : It is a Buzz number.
10. Write a program to enter the time in minutes and print the following output :
_____________hours__________min

Example : Input : Enter the time in minutes : 90

Output : 1 hour 30 min

You might also like