PROGRAMMING FUNDAMENTAL
NAME:Ayesha Nasir
PROGRAM:BSIET (A)
Lab Task
1. An isogram is a word or phrase without a repeating letter; however, spaces and hyphens
are allowed to appear multiple times. Write a C++ program to get input string from the
user and check whether the entered string is an isogram?
2. A pangram is a sentence using every letter of the alphabet at least once. Write a C++
program to get input string from the user and check whether the entered string is a
Pangram?
3. A string is a palindrome when it reads the same backward as forward. Write a C++
program to take input string from the user and check whether the entered string is a
Palindrome?
4. Take an input string and perform the following tasks on it
a. Reverse the string.
b. Count the words in the string.
c. Return the letters that repeats in the string.
d. Count the number of times a letter appears in the string.
e. Count the number of vowels in the string.
f. Find the index of the vowels in the string.
g. Calculate the length of the sting.
5. Write a C++ code to get a series of integers form the user and calculate the product of
the
entered series. For example, user enter 222 so your code returns 2x2x2 = 8.
6. Take an integer from the user and perform the following tasks on it.
a. Check whether the number is a prime or not.
b. Check whether the number is a perfect number.
c. Check whether the number is a natural number.
d. Check whether the number is even or odd.
e. Check whether the number is positive or odd.
f. Generate the multiplication table of a given integers.
g. Find the factorial of a number.
7. Matrix is a multidimensional array. Take a matrix of integers as input and perform the
following tasks on it.
a. Return its rows and columns.
b. Find the maximum number in each row.
c. Find the minimum number in each column.
d. Calculate the average of the numbers in the matrix.
e. Transpose the matrix.
f. Get a second matrix and swap the values of both matrices.
g. Get a second matrix and multiple both matrices.
h. Get a second matrix and add both matrices.
8. Write a C++ code to convert an array to a comma separated string.
9. Write a C++ code to convert the string into array.
10. Write a C++ code to append the two arrays.