C Programs

C Program to convert integer into years, months and days.

Input: Input days: 2535 Output: Years = 6Months = 11Days = 15

C Program to convert an integer to hours, minutes and seconds.

Input: Input seconds: 25300 Output: Hours = 7Minutes = 1Seconds = 40

C Program that reads an amount (integer value) and breaks the amount into possible number of bank notes.

Input: Input the amount: 375 Output: hundred notes = 3fifty notes = 1twenty notes = 1ten notes = 0five notes = 1two notes = 0one notes =...

C Program to calculate the distance between two points.

Input: Input x1: 25Input y1: 15Input x2: 35Input y2: 10 Output: Distance between two points = 11.180340

C Program to calculate a bike’s average consumption from given distance travelled and spent fuel.

Input: Input the total distance: 350Input total fuel spent in litres: 5 Output: Average consumption = 70.00

C Program to print the maximum number among 3 integers.

Input: First integer: 25Second integer: 35Third integer: 5 Output: Maximum value = 35

Recent Articles

Stay on op - Ge the daily news in your inbox

spot_img