In a box of total area 10000cm3, Mr. Varun has to pack the balls of given radius “r” and all the balls have the same volume, Help Mr. Varun to find the total number of balls that he can pack in the given box.
Requirements
Capture the radius of the ball “r”
Compute the volume (Hint: Volume=4/3πr3)
Calculate how many number of balls can be placed in the box of 10000cm3 box
Display the number of balls packed by Mr. Varun
As many of the students like chats, chips, juice and chocolates, a vending machine is kept at several places. The person after putting the cash has to enter the product code so as to get it.
The code is as follows
Code Product
106 Haldiram Ratmali Sev
206 Haldiram Instant Bhel
306 Fuse Chocolate
406 Mixed Fruit Juice
506 Lassi
Depending on the code entered the item will be selected and given to the person who feeds the amount.An application has to be developed so that it automatically works after entering the code.
Requirements:
1. Capture the Code
2. Check the code with the existing code and display appropriate product selected
3. If the code is entered wrong it has to display money lost
Peter runs a vehicle rental center. The vehicles are of three types, MICRO, MINI and SUV. The customer who travels in MICRO will pay Rs 15 per kilometer. The customer who travels in MINI will pay Rs 20 per kilometer and the customer who travels in SUV will pay Rs 25 per kilometer.
A software need to be developed to compute the cost of travelling by the customer with following requirements.
a. The distance travelled by customer need to be captured.
b. The type of vehicle to be captured (M for Micro, m for mini, S for SUV).
c. Check the type of vehicle.
d. Compute the final cost of the travel depending on the vehicle.
Display the final cost.
write a program in c to add two polynomials with n number of variables
What would be the output of the following program? Explain.
i n t main ( )
{
p i d t pid 1 ;
p r i n t f ( ‘ ‘ b e f o r e f o r k ( ) ’ ’ ) ;
i f ( ( pid 1=f o r k ()) >0)
{
w ai t pi d ( pid1 , NULL, 0 ) ;
}
e l s e i f ( pid 1 == 0 ) {
e x e c l ( ‘ ‘ / u s r / bin / bash ’ ’ , ‘ ‘ bash ’ ’ ,NULL ) ;
p r i n t f ( ‘ ‘ done l a u n c hi n g the s h e l l ’ ’ ) ;
}
e l s e {
p e r r o r ( ‘ ‘ f o r k ( ) ’ ’ ) ;
}
}
What to submit:
• Write-up describing an explanation for the output (i.e. why you observe
what you observe).
One metric ton is approximately 2205 pounds. Write a program that prompts the user to input the amount of rice, in pounds, in a bag. The program outputs the number of bags needed to store one metric ton of rice.
As many of the students like chats, chips, juice and chocolates, a vending machine is kept at several places. The person after putting the cash has to enter the product code so as to get it.
The code is as follows
Code Product
106 Haldiram Ratmali Sev
206 Haldiram Instant Bhel
306 Fuse Chocolate
406 Mixed Fruit Juice
506 Lassi
Depending on the code entered the item will be selected and given to the person who feeds the amount. An application has to be developed so that it automatically works after entering the code.
Peter runs a vehicle rental center. The vehicles are of three types, MICRO, MINI and SUV. The customer who travels in MICRO will pay Rs 15 per kilometer. The customer who travels in MINI will pay Rs 20 per kilometer and the customer who travels in SUV will pay Rs 25 per kilometer.
A software need to be developed to compute the cost of travelling by the customer with following requirements.
a. The distance travelled by customer need to be captured.
b. The type of vehicle to be captured (M for Micro, m for mini, S for SUV).
c. Check the type of vehicle.
d. Compute the final cost of the travel depending on the vehicle.
Display the final cost.
Delhi government has issued a circular to control the pollution due to vehicle. It has prohibited the use of odd numbers registered vehicle on Monday, Wednesday and Friday and not to use even number registered vehicles on Tuesday, Thursday and Saturday. Sunday they have to use public transport so no vehicle should be used.
A software application is to be developed by Delhi Government which will inform the owner of the vehicle on which day they can use the vehicle.
Following are the requirements to solve the problem
a. The registration number of the vehicle should be captured from the owner.
b. Check if the registration number is odd or even.
c. Inform user on which day they can use the vehicle.
Class Coordinator of the section 01 wants to select the student class representative. A student is eligible to become class representative if he/she has scored minimum of 75% in 12th Standard and less than 15K ranking in the entrance test.
A software needs to be developed to help Class coordinator to select the class representative.
1. Students rank in entrance test should be captured.
2. Students 12th percentage should be captured.
3. Check if rank is less than 15k and 12th percentage is more than 75%
4. If both the criteria is true, Display Eligible.
5. If any one of the criteria is false, Display Not Eligible.