Professional Documents
Culture Documents
Class: FY B.Tech (H, E) Subject: Computer Programming Lab:CE 1 (A)
Class: FY B.Tech (H, E) Subject: Computer Programming Lab:CE 1 (A)
Sr. Title
No.
1 A To calculate simple interest taking principal, rate of interest and number of
years as input from user. Write algorithm & Draw flowchart for the same.
B Write a program to find greatest of three numbers using conditional operator.
Write algorithm & Draw
2 A Write a program to check if the year entered is leap year or not. Write
algorithm & Draw Flowchart for the same.
B Write a program to calculate roots of a quadratic equation
B Write a program to find the sum of seven terms using a for loop for the
following series:
1/1!+2/2!+3/3!+..+7/7!
4 A Write a program to read a number, reverse the number and display the sum of
digits of number
B Write a program (using 'for' loop) to display the following asking the user for
the number of lines. Write algorithm & Draw flowchart for the same.
A
ABA
ABCBA
ABCDCBA
ABCDEDCBA
5 A Write a program to check if the entered number is Armstrong or not. Write
algorithm & Draw flowchart for the same.
6 B Write a program to find nCr using function. Write algorithm & Draw
flowchart for the same.
C Write a program which will accept n and r and calculate nCr=n!/r!(n-r)! using
recursive functions
B Write a program to count blank spaces, digits, vowels and consonants in the
string.
B Define a structure called cricket that will describe the following information
player name, country name best score, batting average. Develop a program
that will store information of 25 cricket players around the world using this
structure. Also display names of these cricketers in descending order with
respect to their batting average.
10 A Write a program to swap two numbers using a function. Pass the values to be
swapped to this function using call-by-value method and call-by-reference
method.
B Write a program to accept a set of 10 numbers and print the number using
pointer