Lancer Convent Cs
Lancer Convent Cs
2
Write a program to check whether a year is leap year
or not and print proper message.
:
3
3. A school has following rules for grading system:
a. Below 25 - F
b. 25 to 45 - E
c. 45 to 50 - D
d. 50 to 60 - C
e. 60 to 80 - B
f. Above 80 - A
Ask user to enter marks and print the corresponding grade
4
4. Input three numbers and display the largest &
smallest number.
5
5.Generate the following patterns using nested loop.
6
7
6. Write a program to input the value of x and n and print the
sum of the following series:
1+x+x2+x3+x4+. .......... xn
8
7. Determine whether a number is an armstrong number or not.
9
8. Display the n terms of a Fibonacci series
10
9.Count and display the number of vowels, consonants, spaces,
uppercase, lowercase characters in string.
11
10. Input a string and determine whether it is a palindrome or
not.
12
11.Take a sentence as an input where each word in the sentence is
separated by a space. Replace each blank with a hyphen and print
the modified sentence.
13
12.Write a program to replace the vowels with ‘*’ in the string
‘Program to replace vowels in a string’.
14
13.Write a program to join starting 5 letters and ending 3 letters of
string1 with starting 3 letters and ending 5 letters of string2 to form
a string3.
15