You are on page 1of 2

Programming Contest 2021

Read all the questions carefully before writing code. It will help you to solve
maximum numbers of problems. 
1.  Write a program to display the string Campus Boi in the first line and then
display A Book Sharing Application in the next line

Sample Output : 
Campus Boi 
A Book Sharing Application
2. One of your friends installs the Campus Boi app from the Google Play Store
and then he wants to share a book and there are three options like “Gift”  ,
“Giving Back” and “Paid” . Then he selects an option. 
Now write a program to take user input to select any option and display 
selected item comments.
If  input is 1 then selected item comments is  “ The Book is For Gift”  
If  input is 2 then selected item comments is “The Book is For 1
Semester”  
If  input is 3 then selected item comments is  “The Book is For Sell”  
Sample Input:
2
Sample Output: The Book is For 1 Semester
3. To create an account in Campus Boi you need to enter your mobile number
for automatic verification. Your input number must have 11 digits. If you
input 11 digits then there will show “ Generating OTP ” otherwise there will
show an error “Invalid Number” .
Now write a program that takes a phone number as input and displays either
Invalid phone number or Generating OTP according to the condition . 

Sample Input1: 01112345678

Sample Output1: Generating OTP 

Sample Input2: 01123456


Sample Output2: Invalid Number
4. The Campus Boi app who shares most books in a semester got rewarded
from Campus Boi namely Torch Bearer Award. Suppose you have 4 extra
books and you want to share those books through Campus Boi App. After
sharing 3 books you can’t share anymore on the same day. When you are
trying to share the 4no book there shows an alert “ You can share maximum
3 books in a day ”. 
Now write a program that input book names one by one and count shared books
and when already 3 books shared then display a message “You can share
maximum 3 books in a day”
Sample input : 
C-programming
Java
Data Structure
Sample Output : 
You can share maximum 3 books in a day
5. Users can order books in three ways (Borrow for one semester, Buy old
book, Buy new book) from our Camus Boi App. When a user adds books in
cart, then the items stored in the cart. 
Now write a program that takes input 1 for Borrow or 2 for Old book or  3
for New book  and stores  items in an array of and displays the  frequency of
all order types.
Sample Input :
Input the number of elements to be stored in the array : 6
 
1
3
2
1
3
3
Sample Output : 

Borrow 2 times
Old Book 1 times
           New Book 3 times

You might also like