Pondicherry Engineering College
Pondicherry Engineering College
E" #in tions M y $%&& Co#'(ter Pro)r ##in) L *or tory List o+ ,(estions 1. Write a program using functions to get an n digit number as input and perform the following on it. a) check whether the number is prime. b) check whether the number is a palindrome. 2. Write a program to print all divisors of an n digit number and write them to a file called divisors.txt. 3. Write a program that stores the mark details in sub!ects of a class of 1" students using structures and find out the overall pass percentage of the class. #. Write a program to print all divisors of a n digit number and find those divisors that are s$uares and cubes. . Write a program using functions to get a n digit number and a single digit number as input. %ind whether the single digit number exists in the n digit number and also print its position. &. Write a program to store the income details of people living in a cit' using structures and print the percentage of people with annual income less than (s 1 lakh) between (s 1 *akh and *akhs) and above *akhs. +. Write a program to get a string and replace all the occurrences of the given letter with , e$ual to the count of the occurrence of the letter as shown below. i-p. /tring. Welcome to 0omputer 1rogramming *etter. e o-p. W,lcome,, to 0omput,,,r 1rogramming 2. Write a program to store the mark details of 1" students in sub!ects using structures and print the result in the order of the total marks scored. 3. Write a program using functions to get a string as input and replace the letters that appear in the odd positions with their uppercase e$uivalents. 1". Write a program to get the salar' details of all emplo'ees in an organi4ation and write the details of emplo'ees who are managers to a file called managers.txt. 11. Write a program using functions to get a s$uare matrix as input and find the sum of row elements and column elements. 12. Write a program to perform the operations of a simple scientific calculator using functions. 13. Write a program to store the details of 1" books using structures) and displa' the books to the customers and print the total cost of the books purchased. 1#. Write a program to read an arra' of integers sort them in ascending and descending orders and write them to files ascend.txt and descend.txt respectivel'.