# Programming Problems

Write a program to subtract, add, multiply, and divide 2 numbers (calculator program).

Write a program to print the ASCII value of a character.

Write a program to convert ASCII value to a character.

Write a program to convert a character from lower case to upper case and from upper case to lower case.

Write a program to calculate the percentage of marks of 5 subjects of a student.

Write a program to calculate the arithmetic mean, using formula am = (sum of n terms)/n.

Write a  program to find any power of a number.

Write a  program to find the square root and cube root of a number.

Write a  program to find SIN, COS, sec, TAN, and COSEC of an angle.

Write a  program to find quotient and remainder.

Write a  program to swap two numbers.

Write a  program to swap two numbers without using a third variable.

Write a  program to print the sum of digits of a number.

Write a  program to reverse a number.

Write a  program to print the factorial of a number.

Write a  program to find the area and perimeter of a rectangle, using the formula area = l*w and perimeter = 2*(l+w).

Write a  program to find the area and circumference of a circle, using the formula area = 3.14 *radius2 and circumference = 2 * π * radius.

Write a  program to find surface area and volume of a cone, using formula sa = π * radius (radius + √(h2+r2)) and volume = π * radius2 * (height / 3).

Write a  program to find the perimeter of a parallelogram, using the formula perimeter = 2 (side + base).

Write a  program to convert centigrade to Fahrenheit using formula, t(°f) = t(°c) × 9/5 + 32 and  Fahrenheit to centigrade using formula, t(°c) = (t(°f) – 32) × 5/9.

Write a  program to find the area of a triangle using the formula

Program to find simple interest using the formula, simple interest = (p * t * r)/100, where p = principle amount, t= time period and r= rate of interest.

A program that asks the user how many eggs he/she has and then tells the user how many dozen eggs he/she has and how many extra eggs are leftover.

Write a  program to solve the equation, y = b2 – 4ac. The program should ask the values of variables a, b and c from the user and display the result.

A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one liter of milk is \$0.38 and the profit of each carton of milk is \$0.27. Write a program that does the following:

·        Prompt the user to enter the total amount of milk produced in the morning

·        Outputs the number of milk cartons needed to hold milk

·        Output the cost of producing milk

·        Outputs the profit for producing milk