Hey guys, I am very new to c++, and im trying to learn and master the basics
Could you guys please tell me what i am doing wrong here.
I want to maintain my current coding format.
This is a simple converting code. Will be accepting inches, and feet, that will be converted into centimeters.
The problem is that line 13, does not compile
Thanks
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
const double feet_to_inch = 12; // conversion from feet to inches
const double inch_to_centi = 2.54; // conversion from inches to centimenters
int feet ; 0
double inches ; = 0.0, total_inches = 0.0 ;
double centimeters ; 0.0
// Conversion Program to centimeters
cout << "The quieter you become, the more you will be able to hear";
// Entered value by user in feet
cout << "\n Enter in feet" ;
cin >> feet ;
// Entered value by user in inches
cout << "\n Enter in inches" ;
cin >> inches ;
//Calculate number of inches
total_inches = inches + feet * feet_to_inch ;
// Convert to centimeters
centimeters = total_inches * inch_to_centi ;
// Output results
cout << "/n The Result is :" << centimeters;
char c;
cout << "/n Press anything to Exit" ;
cin >> c;
return 0;
}