Здрасти.
Так тоже правильно будет, да?
Кликните здесь для просмотра всего текста
C++ |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| #include <iostream>
using namespace std;
int main()
{
const float duim = 0.0833333333; // 1 дюйм = 0.0833333333 фута.
unsigned int i;
cout << "Enter your height in inches: __\b\b";
cin >> i;
float f1 = duim;
int f2 = i * f1;
int f3 = i % f2;
cout << "Enter your height in feet: "<< f2 << " and inches: " << f3 << endl;
cin.get();
cin.get();
return 0;
} |
|