00001
00002
00003
00004
00005
00006
00007 #include <iostream.h>
00008 #include "sint.h"
00009
00010 main() {
00011
00012 char ca[80], cb[80];
00013 real cc =0;
00014
00015 cout << "\na= "; cin >> ca;
00016 cout << "b= "; cin >> cb;
00017 cout << "c= "; cin >> cc;
00018
00019 sint a = ca;
00020 sint b = cb;
00021 sint c = cc;
00022
00023 a.print();
00024 cout<<endl;
00025 b.print();
00026 cout<<endl;
00027 c.print();
00028 cout<<endl;
00029 cout <<" a= "<< a << " b=" << b << " c=" << c<<endl;
00030
00031 a = a + b;
00032 b = a + c;
00033
00034 a.chop();
00035 b.chop();
00036
00037 a.print() ;
00038 cout << endl;
00039 b.print() ;
00040 cout << endl;
00041
00042 if (a<b) {
00043 cout << "a= "; a.print();
00044 cout << " < b= ";
00045 b.print(); cout << endl;
00046 }
00047 else {
00048 cout << "a= ";
00049 a.print();
00050 cout << "> b= ";
00051 b.print();
00052 cout << endl;
00053 }
00054
00055 if (a>b) {
00056 cout << "a= ";
00057 a.print();
00058 cout << "> b= ";
00059 b.print();
00060 cout << endl;
00061 }
00062 else {
00063 cout << "a= ";
00064 a.print();
00065 cout << "< b= ";
00066 b.print();
00067 cout << endl;
00068 }
00069
00070 }