Lab01part2 - cout<<"The number of yards...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> using namespace std; u int main (void) { double cm; int yards, feet, inches; i cout<<"Enter centimeters\n"; cin>>cm; inches=(cm/2.54)+.5; yards=inches/36; inches=inches%36; feet=inches/12; inches=inches%12;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout<<"The number of yards is "<<yards<<endl; cout<<"The number of feet is "<<feet<<endl; cout<<"The number of inches is "<<inches<<endl; system ("PAUSE"); return 0; }...
View Full Document

Ask a homework question - tutors are online