- WAP to read a number and check if it is even or oddinput:
Enter a number: 5
output: number 5 is odd
- WAP to read 2 numbers and check if their last digits are same or notinput:
Enter number 1: 55
Enter number 2: 45
output: Last digits of 55 and 45 are same
- WAP to read 3 angles and check if triangle can be formed or notinput:
Enter value for angle a: 50
Enter value for angle b: 60
Enter value for angle c: 70
output: Triangle can be formed
- WAP to read 3 angles and check if it is and equilateral triangle or notinput:
Enter value for angle a: 60
Enter value for angle b: 60
Enter value for angle c: 60
output: Triangle is equilateral triangle
- WAP to read marks for 5 subjects and check if student is passed or notinput:
Enter marks for maths: 50
Enter marks for science: 50
Enter marks for history: 50
Enter marks for english: 50
Enter marks for marathi: 50
output:
Total Marks: 250
Percentage: 50%
Student is passed
- WAP to read 2 numbers and find the greatest of theminput:
Enter number 1: 50
Enter number 2: 60
output:
60 is greater than 50
- WAP to read 3 numbers and find the greatest of theminput:
Enter number 1: 50
Enter number 2: 60
Enter number 2: 70
output:
70 is greater than 50 and 60
- WAP to read 3 digit number and check if the sum of cube of its digits is equal to that number or notinput:
Enter a 3 digit number: 153
output:
Success: Sum of cube of 153 is 153
- WAP to read 3 numbers and check their last digit is same or notinput:
Enter number 1: 50
Enter number 2: 60
Enter number 3: 70
output:
Last digits of 50, 60 and 70 are same
- WAP to read a number and check if it is palindrome number or notinput:
Enter a number: 121
output:
121 is palindrome number
- WAP to read marks of 5 subjects and print their total. Also print percentage and check if student is passed or notinput:
Enter marks for maths: 50
Enter marks for science: 50
Enter marks for history: 50
Enter marks for english: 50
Enter marks for marathi: 50
output:
Total Marks: 250
Percentage: 50%
Student is passed
- WAP to read 3 angles and check if triangle can be formed or not. If triangle can be formed then check it it is equilateral, isosceles or right angled triangleinput:
Enter value for angle a: 45
Enter value for angle b: 45
Enter value for angle c: 90
output:
Triangle can be formed
The triangle is right angled triangle
- WAP to read age and gender of person and check if person is Eligible for marriage or notinput:
Enter gender M or F: M
Enter your age: 30
output:
30 ka ho gaya ab to shadi kar le
- WAP to read a year and check if it is Leap year or notinput:
Enter year: 2004
output:
Year 2004 is a leap year
- WAP to read a Salary of Employee and print commission according to following Criteria
SAL Commission
<10000 10%
10000-20000 12%
>20000 15%input:
Enter Salary: 10000
output:
Your commission is 1000 Rupees
- WAP to read percentage of student and print Division
>=75 : 1st class with distinction
60-75: 1st class
50-60: 2nd class
40-50: 3rd class
<40: failinput:
Enter marks for maths: 75
Enter marks for science: 75
Enter marks for history: 75
Enter marks for english: 75
Enter marks for marathi: 75
output:
Total Marks: 375
Percentage: 75%
Student passed with 1st class Distinction