- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
int main( void )
{
fraction f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15;
fraction t1f1, t1f2, t1f3, t1f4, t1f5, t1f6, t1f7, t1f8, t1f9, t1f10, t1f11, t1f12, t1f13, t1f14, t1f15;
fraction t2f1, t2f2, t2f3, t2f4, t2f5, t2f6, t2f7, t2f8, t2f9, t2f10, t2f11, t2f12, t2f13, t2f14, t2f15;
fraction t3f1, t3f2, t3f3, t3f4, t3f5, t3f6, t3f7, t3f8, t3f9, t3f10, t3f11, t3f12, t3f13, t3f14, t3f15;
fraction t4f1, t4f2, t4f3, t4f4, t4f5, t4f6, t4f7, t4f8, t4f9, t4f10, t4f11, t4f12, t4f13, t4f14, t4f15;
fraction t5f1, t5f2, t5f3, t5f4, t5f5, t5f6, t5f7, t5f8, t5f9, t5f10, t5f11, t5f12, t5f13, t5f14, t5f15;
fraction t6f1, t6f2, t6f3, t6f4, t6f5, t6f6, t6f7, t6f8, t6f9, t6f10, t6f11, t6f12, t6f13, t6f14, t6f15;
fraction t7f1, t7f2, t7f3, t7f4, t7f5, t7f6, t7f7, t7f8, t7f9, t7f10, t7f11, t7f12, t7f13, t7f14, t7f15;
fraction t8f1, t8f2, t8f3, t8f4, t8f5, t8f6, t8f7, t8f8, t8f9, t8f10, t8f11, t8f12, t8f13, t8f14, t8f15;
fraction t9f1, t9f2, t9f3, t9f4, t9f5, t9f6, t9f7, t9f8, t9f9, t9f10, t9f11, t9f12, t9f13, t9f14, t9f15;
fraction t10f1, t10f2, t10f3, t10f4, t10f5, t10f6, t10f7, t10f8, t10f9, t10f10, t10f11, t10f12, t10f13, t10f14, t10f15;
fraction t11f1, t11f2, t11f3, t11f4, t11f5, t11f6, t11f7, t11f8, t11f9, t11f10, t11f11, t11f12, t11f13, t11f14, t11f15;
fraction t12f1, t12f2, t12f3, t12f4, t12f5, t12f6, t12f7, t12f8, t12f9, t12f10, t12f11, t12f12, t12f13, t12f14, t12f15;
fraction t13f1, t13f2, t13f3, t13f4, t13f5, t13f6, t13f7, t13f8, t13f9, t13f10, t13f11, t13f12, t13f13, t13f14, t13f15;
fraction t14f1, t14f2, t14f3, t14f4, t14f5, t14f6, t14f7, t14f8, t14f9, t14f10, t14f11, t14f12, t14f13, t14f14, t14f15;
fraction t15f1, t15f2, t15f3, t15f4, t15f5, t15f6, t15f7, t15f8, t15f9, t15f10, t15f11, t15f12, t15f13, t15f14, t15f15;
fraction current;
current.getnum( 1 );
int den( 0 );
int num ( 1 );
do
{
cout << "Enter den: ";
cin >> den;
if( den > 16 )
{
cout << "Very big den! Try again!" << endl;
continue;
}
if( den < 2 )
{
cout << "Very small den! Try again!" << endl;
continue;
}
current.getden( den );
}
while( den > 16 || den < 2 );
//////////////////////////////////////////////////////////////////////////////////////////////
cout << endl;
cout << "----------------------------------------------------------------------" << endl;
f1 = current;
f1.showfrac( ); cout << " ";
current.getnum( ++num );
if( den > num )
{
f2 = current;
f2.lowterms( );
f2.showfrac( ); cout << " ";
}
current.getnum( ++num );
if( den > num )
{
f3 = current;
f3.lowterms( );
f3.showfrac( ); cout << " ";
}
current.getnum( ++num );
if( den > num )
{
f4 = current;
f4.lowterms( );
f4.showfrac( ); cout << " ";
}
current.getnum( ++num );
if( den > num )
{
f5 = current;
f5.lowterms( );
f5.showfrac( ); cout << " ";
}
current.getnum( ++num );
if( den > num )
{
f6 = current;
f6.lowterms( );
f6.showfrac( ); cout << " ";
}
current.getnum( ++num );
if( den > num )
{
f7 = current;
f7.lowterms( );
f7.showfrac( ); cout << " ";
}
current.getnum( ++num );
if( den > num )
{
f8 = current;
f8.lowterms( );
f8.showfrac( ); cout << " ";
}
current.getnum( ++num );
if( den > num )
{
f9 = current;
Выполнение задания. Массивы? Проверка ввода? Не, не слышали!