logo image

C++ program to convert inches to feet

Views: 259

Following program shows you how to convert inches to feet. In this program we get inches from user, once we get those we need to divide with 12 so that we get in feet

#include <iostream>
#include <math.h>

int main() {
	float inches;
	std::cout << "Please enter inches:";
	std::cin >> inches;
	float feet = inches / 12;
	std::cout << feet << " Feet";


Please enter inches: 15
1.25 Feet