0% found this document useful (0 votes)
4 views15 pages

Lancer Convent Cs

The document outlines a series of programming tasks including calculating simple interest, checking for leap years, implementing a grading system based on marks, finding the largest and smallest of three numbers, generating patterns, calculating a series sum, checking for Armstrong numbers, displaying Fibonacci series, counting characters in a string, checking for palindromes, modifying sentences, replacing vowels, and joining parts of two strings.
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 views15 pages

Lancer Convent Cs

The document outlines a series of programming tasks including calculating simple interest, checking for leap years, implementing a grading system based on marks, finding the largest and smallest of three numbers, generating patterns, calculating a series sum, checking for Armstrong numbers, displaying Fibonacci series, counting characters in a string, checking for palindromes, modifying sentences, replacing vowels, and joining parts of two strings.
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
You are on page 1/ 15

Write a program for calculating simple interest.

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

You might also like