Professional Documents
Culture Documents
Lab Practice Assignment 2
Lab Practice Assignment 2
Lab Practice Assignment 2
Q9. Write a program in C++ having a user defined function that accepts a character. If the character is
an uppercase letter, the function returns the next consecutive letter of the alphabet. If the character
is a lowercase letter, the function returns the previous consecutive letter of the alphabet. The value
returned by the function is printed on the screen. If the character is not a letter, the function returns
the question mark ('?') character and a message "Character not found in the
alphabet", is printed on the screen before the program ends.
Q10. Write a program in C++ to print Fibonacci series.
Q11. Write a program in C++ that reads a positive integer entered by a user and prints all positive divisors
of that integer in decreasing order. The program should allow the user to repeat this process as
many times as the user likes.
Q12. Write a program in C++ to perform basic arithmetic operations using switch case.