Bhagwan Mahavir University
Bhagwan Mahavir College Of Computer Application (BCA)
F.Y.BCA (Semester-I)
2020201102: Programming in C
PROBLEMSHEET-I
1) WAPT display statement “Hello world!”.
2) WAPT input 2 numbers and perform all arithmetic operations. (addition,
substraction, multiplication, division, modulus)
3) WAPT input 11 player’s age of indian cricket team and find the average of 11
player’s age.
4) WAPT read and display roll number, three subject marks, total and percentage
from user.
5) Program to Find Area of Square (length*length), rectangle (length*breadth) and
a Circle(3.14*r*r).
6) WAPT calculate Simple Interest.(SI=p*r*n)
P=principle amount
R= rate of interest
N=no of year
7) WAPT input 2 values and to Changing (swapping) value of two variables using
use of third variable.
Eg: a=10 b=20 c=0
Output : a=20 b=10
8) WAPT input 2 values and to Changing(swapping) value of two variables without
use of third variable.
9) WAPT check the number is even or odd.
10) WAPT find the distance between 2 cities (in Kilometer) is input through
K/B.WAPT convert & print this distance in meter, inch, feet and centimeter
11) WAPT find Whether the Given Number is a Prime Number.
12) WAPT check Whether a Character is Vowel or not by using switch Statement.
13) WAPT Find Whether a Number is Palindrome or Not.Ex=(121→121)
14) WAPT check whether the number is +ve, -ve or zero.
15) WAPT check whether inputted character is vowel or consonants.
16) WAPT read a cost price, selling price of an item, program to determine whether
the seller has been made profit or loss.
17) WAPT find inputted year is ‘leap’ or ‘not’.
18) WAPT in c to input any character if it is in upper case, lower case, digit or space.
19) WAPT read a character from keyboard and print it in reverse case. For example
enter the character: a(lower case) then the output will be return A(upper case)
20) Write program to convert decimal integer into binary equivalent
21) Write a program to calculate result according to following rules. Take input roll
no, name, m1, m2, m3, m4 and calculate percentage, result and class.
Bhagwan Mahavir University
Bhagwan Mahavir College Of Computer Application (BCA)
F.Y.BCA (Semester-I)
2020201102: Programming in C
PROBLEMSHEET-I
The class is declared on the following criteria.
If per>=70, class=”Distinction”
If per>=60 and per<70, class=”First”
If per>=50 and per<60, class=”Second”
If per>=40 and per<50, class=”Pass”
Result= “Pass” if pass in all subjects
=”ATKT” if fail in at the most 2 subject
=”Fail” otherwise.
The class should be declared if the student is passing in all subjects. Print the
result in following format: Do required validations.
Roll No Name Total Percentage Result Class
1 ABC 400 0.00% Pass First
22) Program to Check Whether the Given Number is an Armstrong Number or not.
Example:153 is Armstrong number because
(1*1*1+5*5*5+3*3*3)=(1+125+27)=153
23) Program to Print the Numbers Which are Divisible by 3 and 5 from First 100
Natural Numbers
24) Program to Reverse a Given Number
Ex:enter number 1234 revers print 4321
25) WAPT generate following series up to given step:0 1 1 2 3 5 8 13…N
26) WAPT generate following series up to given steps:1 3 6 10 15
27) WAPT display the followimg series: 1,4,27,256,…,n.
28) Write a program to display the sum of first 10 natural numbers.
29) Write a program to display the sum of N odd number & even number.
30) If 5 digit numbers is input through the k/b, write a program to calculate the sum
of digit. Example: 123 then output is sum=1+2+3=6
31) WAPT perform arithmetic operators (+, *, / , -)on two inputted numbers based
on the user’s choice.(prepare menu for operator selection)
32) Write a program to find the factorial value of any number entered through
keyboard. Ex:5! Then output is 1*2*3*4*5!=120
33) Write a program to display all prime number from 1 to 100.
34) Write a program to display the positive integer is palindrome or not.
35) Write a program to read the age of 10 employee and count the number of
Bhagwan Mahavir University
Bhagwan Mahavir College Of Computer Application (BCA)
F.Y.BCA (Semester-I)
2020201102: Programming in C
PROBLEMSHEET-I
persons in following age group:
Age group:10-30,31-55 and 56-75
36) If 5 digit numbers is input through the k/b, write a program to obtain the reverse
number & determine whether the original & reversed number is equal or not.
37) Program to Print the Pattern:
1
121
12321
1234321
123454321
12345654321
1234567654321
123456787654321
12345678987654321
38) WAPT print the following pattern for n=5.
5 4 3 2 1
5 4 3 2
5 4 3
5 4
5
39) WAPT print the following triangle for any given number N.
For Example N=4
10 20 30 40
50 60 70
80 90
100
40) WAPT generate following output in the middle of the screen
1
12
123
Bhagwan Mahavir University
Bhagwan Mahavir College Of Computer Application (BCA)
F.Y.BCA (Semester-I)
2020201102: Programming in C
PROBLEMSHEET-I
1234
12345
41) WAPT print the following output using “for” loop.
1) 1 2) *****
22 ****
333 ***
444 **
55555 *
42) WAPT generate following output in the middle of the screen
1) n=3 (Pascal 2) 1 3) * 4) * * * * *
triangle) 10
* * * *
1 101
* * * * *
232 1010
* * * *
34543
* *** **
NOTE: Problemsheet-1 for all division (FYBCA : A TO J)