0% found this document useful (0 votes)
42 views2 pages

Cse C Program

The document outlines a series of programming tasks in C that involve arithmetic operations and conversions. It includes programs for converting distances, calculating movie running times, determining ratios of integers, computing distances between points, distributing chocolates, redeeming coupons for chocolates and gum, calculating car rental costs, storing marbles in a box, and determining elevator operations for a queue of people. Each task specifies the inputs required and the expected outputs.

Uploaded by

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

Cse C Program

The document outlines a series of programming tasks in C that involve arithmetic operations and conversions. It includes programs for converting distances, calculating movie running times, determining ratios of integers, computing distances between points, distributing chocolates, redeeming coupons for chocolates and gum, calculating car rental costs, storing marbles in a box, and determining elevator operations for a queue of people. Each task specifies the inputs required and the expected outputs.

Uploaded by

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

(Arithmetic Operation)

1. Write a program to Input distance (in km) and convert in meter, feet, inches and centimeter.
2. Write a C program which can input running time of a movie by inputting two numbers
mentioning hour and minute of that movie. Display what is the running time of that movie in
minutes. Display running time in fractional hour format. As example, if input is 1 hour 15
minutes, then one output is 75 minutes and another output is 1.25 hours.
3. Write a C program which can input 4 integer numbers from the users and display the ratio
between differences of first two numbers and last two numbers. As example, if input values
are A, B, C, and D then find (A-B)/(C-D).
4. Write a C program which can input four integer numbers that indicate 2 points in a 2D co-
ordinate system. Display the distance between those two points.
5. Tashfin's uncle Tahseen recently went abroad. On his return he brought a lot of chocolates
for his nephews and nieces who are eight in number. Tahseen wants to distribute these
chocolates evenly among all his nephews and nieces. However, before distributing it he will
keep five chocolates for his brothers and sister. If the number of remaining chocolates cannot
be evenly distributed among his eight nephews and nieces, then the rest of those remaining
chocolates will be kept for Tahseen's brothers and sister. Develop a C program which will
take as input the number of chocolates Tahseen brought and display how many chocolates
will Tahseen's each nephew/nieces get. Also, find and display how many chocolates will be
for Tahseen’s brothers and sisters.

6. Tashfin’s cousin bought some books for him where the shopkeeper gives one coupon with
each book and said that if he returns those coupons then for every three coupons, he can get
one chocolate and for each coupon he can get one chewing gum. However, Tashfin is more
interested in chocolates than chewing gum. Write a C program which can input number of
books Tasfin’s cousin bought and display how many chocolates and chewing gum he can get
by returning those coupons maintaining Tashfin’s choice.

7. A car rental company charges 20 taka for every kilometer of travel. (It charges full 20 taka
for any fractional km). It also charges 2 taka for every minute of waiting. Write a C program
which can input a fractional number indicating distance travel and an integer number
indicating waiting time in minutes. Display the total bill for that ride.

8. You have bought many cubic shaped marbles and want to store them in a cube shape box.
Write a C program which can input the length of marbles and length of the box and display
how many marbles can be stored in that box.
9. Suppose an elevator can accommodate m number of people and there are n people in the
queue. Write a C program to input integers indicating those m and n and display how many
times the elevator operates to serve all those people in queue.

You might also like