By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,655 Members | 964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,655 IT Pros & Developers. It's quick & easy.

Help me with this c++ conversion

P: 31
i made this conversion but i got stuck, ill show it in bold and underline it to show you

Expand|Select|Wrap|Line Numbers
  1. #include <iostream>                        
  2. using namespace std;                       
  3.  
  4. int main() {                              
  5.     float centimeters;                        
  6.     float inches;
  7.  
  8.     cout << "Enter number of Inches: ";
  9.     cin >> centimeters;
  10.     inches = 1 * 2.54;
  11.     cout << "centimeters = " << inches << endl;
  12.  
  13.     system("PAUSE");
  14.     return 0;                            
  15. }
  16.  
Mar 14 '07 #1
Share this Question
Share on Google+
1 Reply


Banfa
Expert Mod 5K+
P: 8,916
You don't use the variable centimeters in your calculation
Mar 14 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.