0% found this document useful (0 votes)
37 views8 pages

Lms Test (12th To 17th August)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views8 pages

Lms Test (12th To 17th August)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

The prime functionality of an Event Management System is budgeting.

An Event Management
System should estimate the total expenses incurred by an event and the percentage rate of each
of the expenses involved in planning and executing an event. Nikhil, the founder of "Pine
Tree" wanted to include this functionality in his company’s KL Event Management System
and requested your help in writing a program for the same.
The program should get the branding expenses, travel expenses, food expenses and logistics
expenses as input from the user and calculate the total expenses for an event and the
percentage rate of each of these expenses.
#include<stdio.h>
int main()
{
int be,te,fe,le;
float b,t,f,l,t1;
printf(“Enter branding expenses\n”);
scanf(“%d”,&be);
printf(“Enter travel expenses\n”);
scanf(“%d”,&te);
printf(“Enter food expenses \n”);
scanf(“%d”,&fe);
printf(“Enter logistics expenses\n”);
scanf(“%d”,&le);
t=be+te+fe+le;
b=(float)((be*100)/t);
t1=(float)((te*100)/t);
f=(float)((fe*100)/t);
l=(float)((le*100)/t);
printf(“Total expenses : Rs.%.2f”,t);
printf(“Branding expenses percentage : %.2f%”,b);
printf(“Travel expenses percentage : %.2f%”,t1);
printf(“Food expenses percentage : %.2f%”,f);
printf(“Logistics expenses percentage : %.2f%”,l);
return 0;
}

Sample Input and Output:


Enter branding expenses
20000
Enter travel expenses
40000
Enter food expenses
15000
Enter logistics expenses
25000
Total expenses : Rs.100000.00
Branding expenses percentage : 20.00%
Travel expenses percentage : 40.00%
Food expenses percentage : 15.00%
Logistics expenses percentage : 25.00%
Wisconsin State Fair is one of the largest midsummer celebrations in the Midwest Allis,
showcasing the agriculture skills and prowess of the state. The Event organizers hired few
part-time employees to work at the fair and the agreed salary paid to them are as given below:
Weekdays --- 80 / hour
Weekends --- 50 / hour
Justin is a part-time employee working at the fair. Number of hours Justin has worked in the
weekdays is 10 more than the number of hours he had worked during weekends. If the total
salary paid to him in this month is known, write a program to estimate the number of hours he
had worked during weekdays and the number of hours he had worked during weekends.
#include<stdio.h>
int main()
{
int s,x,y;
printf(“Enter the total salary paid\n”);
scanf(“%d”,&s);
x=(s-800)/130;
y=x+10;
printf(“Number of weekday hours is %d\n”,x);
printf(“Number of weekend hours is %d\n”,y);
}

Sample Input and Output:


Enter the total salary paid
2750
Number of weekday hours is 25
Number of weekend hours is 15
"Planet Kids Entertainment Fair" is back to delight kids and parents. The Fair will have non-
stop entertainment with an extravaganza of games, exciting rides, sports, art & crafts, role-
plays, inspiring competitions, prizes & gifts, and yummy food.
Few lucky attendees at the Fair will be given a pack of candies as a lucky gift and the show
coordinator has assigned you the task for choosing the number of attendees who will receive
the pack of candies. There are 'N' candies available and you need to decide how many candies
to place in each pack. Each pack must contain the same number of candies. You should choose
an integer A between 1 and N, inclusive, and place exactly A candies into each pack. You
should make as many packs as possible but since you enjoy eating candies very much, you eat
the remaining candies.
Write a program that will calculate the pack size(A) so that you can eat as many candies as
possible. If multiple pack size will result in the same number of leftover candies, then print the
largest pack size.
#include<stdio.h>
#include<math.h>
int main()
{
int n,x;
scanf(“%d”,&n);
x=(n/2)+1;
printf(“%d”,x);
return 0;
}
Sample Input :
5
Sample Output :
3
Pranav, an enthusiastic kid visited the "Fun Fair 2023" along with his family. His father
wanted him to purchase entry tickets from the counter for his family members. Being a little
kid, he is just learning to understand about units of money. Pranav has paid some amount of
money for the tickets but he wants your help to give him back the change of Rs. N using
minimum number of rupee notes.
Consider a currency system in which there are notes of seven denominations, namely, Rs. 1,
Rs. 2, Rs. 5, Rs. 10, Rs. 50, Rs. 100. If the change given to Pranav Rs. N is input, write a
program to compute smallest number of notes that will combine to give Rs. N.
#include<stdio.h>
int main()
{
int n,x1,x2,x3,x4,x5,x6,s;
scanf(“%d”,&n);
x6=n/100;
n=n%100;
x5=n/50;
n=n%50;
x4=n/10;
n=n%10;
x3=n/5;
n=n%5;
x2=n/2;
n=n%2;
x1=n;
s=x1+x2+x3+x4+x5+x6;
printf(%d”,s);
return 0;
}

Sample Input :
242
Sample Output:
7
HillTown Inn is planning to organize a Food Festival bringing together at one place, a wide
variety of cuisines from across the world on account of Christmas. The Hotel Management has
rented out a square hall of an indoor Auditorium for this extravaganza. The side of the square
hall is y inches in which a large square table is placed for the display of the most popular and
celebrated food items. The side of the square table is x inches, such that x<y.
The Management wanted to fill the remaining floor area with a decorative carpet. To get this
done, they needed to know the floor area to be filled with the carpet. Write a program to help
the Management find the area of the region located outside the square table, but inside the
square hall.
#include<stdio.h>
int main()
{
int x,y,z;
printf(“Enter the side of the square hall\n”);
scanf(“%d”,&x);
printf(“Enter the side of the square table place for display\n”);
scanf(“%d”,&y);
z=(x*x)-(y*y);
printf(“Area to be decorated is %d”,z);
return 0;
}

Enter the side of the square hall


5
Enter the side of the square table placed for display
2
Area to be decorated is 21

Mountain View Middle School is all set for organizing their elaborate talent show event of the
year, "Stars Onstage". It is a fun-filled event for the students to showcase and build their
confidence.
Of the total audience who had come for the show, 1/3 were boys, 3/6 were girls and the rest of
them were adults. If there were 'x' more girls than adults, how many people were there in
total? Help the School authorities to find the total people who visited their show.

#include<stdio.h>
int main()
{
int x,t;
printf(“Enter x\n”);
scanf(“%d”,&x);
t=x*3;
printf(“%d people were there in total”,t );
return 0;
}

Sample Input and Output:


Enter x 50
150 people were there in total

A recently launched attraction at the "Events Square" entertainment fair is the "Carnival of
Terror" which is an interactive fun zone featuring scary, horror and Halloween stories.
The Entry tickets for the show is to be printed with a Welcome message along with an
additional message for Children stating they should be accompanied by an adult. Given the
age of the person visiting the scary house, the ticket should carry the additional message only
for Children whose age is less than 15 years. The show organizers wanted your help to
accomplish this task. Write a program that will get age as the input and display the appropriate
message on the tickets.

#include<stdio.h>
int main()
{
int age;
scanf(“%d”,&age);
if(age>=15)
printf(“Welcome to the show”);
else
printf(“Welcome to the show\n” “please note that you should be accompanied by an adult\n”);
}
Sample Input 1:
20

Sample Output 1:
Welcome to the show
Sample Input 2:
14
Sample Output 2:
Welcome to the show
Please note that you should be accompanied by an adult
"FantasyKingdom" is a brand new Amusement park that is going to be inaugurated shortly in
the City and is promoted as the place for breath-taking charm. The theme park has more than
30 exhilarating and craziest rides and as a special feature of the park, the park Authorities has
placed many Ticketing Kiosks at the entrance which would facilitate the public to purchase
their entrance tickets and ride tickets.
The Entrance Tickets are to be issued typically based on age, as there are different fare for
different age groups. There are 2 types of tickets – Child ticket and Adult ticket. If the age
given is less than 15, then Child ticket is issued whereas for age greater than equal to 15, Adult
ticket is issued. Write a piece of code to program this requirement in the ticketing kiosks.
#include<stdio.h>
int main()
{
int age;
scanf(“%d”,&age);
if(age>=15)
printf(“Adult Ticket\n”);
else
printf(“Child Ticket\n”);
}
Sample Input 1:
20
Sample Output 1:
Adult Ticket
Sample Input 2:
12
Sample Output 2:
Child Ticket

The much awaited event at the entertainment industry every year is the "Screen Awards". This
year the event is going to be organized on December 25 to honour the Artists for their
professional excellence in Cinema. The Organizers has this time decided to launch an online
portal to facilitate easy booking of the Award show’s tickets.
They specifically wanted to provide an option for bulk booking in the portal, wherein there are
many discounts announced. Write a program to help the Organizers to create the portal as per
the requirement given below.
Given the ticket cost as 'X'.
If the number of tickets purchased is less than 50, there is no discount.
If the number of tickets purchased is between 50 and 100 (both inclusive), then 10% discount
is offered.
If the number of tickets purchased is between 101 and 200(both inclusive), 20% discount is
offered.
If the number of tickets purchased is between 201 and 400(both inclusive), 30% discount is
offered.
If the number of tickets purchased is between 401 and 500(both inclusive), 40% discount is
offered.
If the number of tickets purchased is greater than 500, then 50% discount is offered.
#include<stdio.h>
int main()
{
int ct,tp;
float Total,te;
scanf(“%d”,&ct);
scanf(“%d”,&tp);
Total=ct*tp;

if(tp<50)
printf(“%.2f”,Total);
else if(tp>=50 && tp<=100)
{
Te=Total-(10*Total)/100;
printf(“%.2f”,te);
}
else if(tp>=101 && tp<=200)
{
Te=Total-(20*Total)/100;
printf(“%.2f”,te);
}
else if(tp>=201 && tp<=400)
{
Te=Total-(30*Total)/100;
printf(“%.2f”,te);
}
else if(tp>=401 && tp<=500)
{
Te=Total-(40*Total)/100;
printf(“%.2f”,te);
}
else
{
Te=Total-(50*Total)/100;
printf(“%.2f”,te);
}

}
Sample Input 1:
100
5
Sample Output 1:
500.00

Sample Input 2:
100
300
Sample Output 2:
21000.00
. "Zebra Kingdom" is a brand new Amusement park that is going to be inaugurated shortly in
the City and is promoted as the place for breath-taking charm. The theme park has more than
30 exhilarating and thrilling rides and as a special feature of the park, the park Authorities
have placed many Booking Kiosks at the entrance which would facilitate the public to
purchase their entrance tickets and ride tickets.
There are few rides in the park that are not suitable for children and aged people, hence the
park Authorities wanted to program the kiosks to issue the tickets based on people’s age. If the
age given is less than 15 (Children) or greater than 60 (Aged), then the system should display
as "Not Allowed", otherwise it should display as "Allowed".
#include<stdio.h>
int main()
{
int n;
scanf(“%d”,&n);
if(n<15 || n>60)
{
printf(“Not Allowed\n”);
}
else
{
printf(“Allowed”);
}
return 0;
}

Sample Input 1:
20
Sample Output 1:
Allowed
Sample Input 2:
12
Sample Output 2:
Not Allowed

You might also like