Extras din laborator
#include "complex.h"
Complex C1,C2;
double dist(Complex C1, Complex C2)
{
double rez=(C2.abs()-C1.abs());
if(rez>=0)
return rez;
return (rez*(-1));
}
void main()
{
float r,i;
cout<<"Primul numar: "<<endl;
cout<<" RE=";
cin>>r;
cout<<" IM=";
cin>>i;
C1.set(r,i);
cout<<"Al 2-lea numar: "<<endl;
cout<<" RE=";
cin>>r;
cout<<" IM=";
cin>>i;
C2.set(r,i);
cout<<"Cele doua numere sunt: "<<C1.getRE()<<" + "<<C1.getIM()<<"i si "<<C2.getRE()<<" + "<<C2.getIM()<<'i'<<endl<<endl;
cout<<"Distanta dintre numere este: "<<C1.distla(C2)<<" (functia distla)"<<endl<<endl;
cout<<"Distanta dintre numere este: "<<dist(C1,C2)<<" (functia dist)"<<endl<<endl;
C1.adunacu(C2);
cout<<"Suma numerelor este: "<<C1.getRE()<<" + "<<C1.getIM()<<'i'<<endl<<endl;
cout<<"Cele doua numere sunt: "<<C1.getRE()<<" + "<<C1.getIM()<<"i si "<<C2.getRE()<<" + "<<C2.getIM()<<'i'<<endl<<endl;
C1.inmultestecu(C2);
cout<<"Produsul numerelor este: "<<C1.getRE()<<" + "<<C1.getIM()<<'i'<<endl<<endl;
}
Conținut arhivă zip
- Tema 1
- Test
- Debug
- complex.obj
- p1.obj
- p2.obj
- p3.obj
- p4.obj
- poligon.obj
- punct.obj
- Test.exe
- Test.ilk
- Test.pch
- Test.pdb
- triunghi.obj
- vc60.idb
- vc60.pdb
- vector.obj
- complex.cpp
- complex.h
- Help.txt
- p1.cpp
- p2.cpp
- p3.cpp
- p4.cpp
- poligon.cpp
- poligon.h
- punct.cpp
- punct.h
- Test.dsp
- Test.dsw
- Test.ncb
- Test.opt
- Test.plg
- triunghi.cpp
- triunghi.h
- vector.cpp
- vector.h
- Tema 2
- Test
- Debug
- complex.obj
- lista.obj
- listaPC.obj
- p1.obj
- p2.obj
- p3.obj
- student.obj
- Test.exe
- Test.ilk
- Test.pch
- Test.pdb
- vc60.idb
- vc60.pdb
- complex.cpp
- complex.h
- lista.cpp
- lista.h
- listaPC.cpp
- listaPC.h
- p1.cpp
- p1.out
- p1.txt
- p2.cpp
- p2.out
- p2.txt
- p3.cpp
- student.cpp
- student.h
- Test.dsp
- Test.dsw
- Test.ncb
- Test.opt
- Test.plg
- Tema 3
- Test
- Debug
- date.obj
- p1.obj
- p2.obj
- p3.obj
- p5.obj
- polinom.obj
- Test.exe
- Test.ilk
- Test.opt
- Test.pch
- Test.pdb
- vc60.idb
- vc60.pdb
- date.cpp
- date.h
- p1.cpp
- p2.cpp
- p3.cpp
- p5.cpp
- polinom.cpp
- polinom.h
- Test.dsp
- Test.dsw
- Test.ncb
- Test.opt
- Test.plg
- Tema 4
- Test
- Debug
- matrix.obj
- p1.obj
- p2.obj
- p4.obj
- set.obj
- Test.exe
- Test.ilk
- Test.pch
- Test.pdb
- vc60.idb
- vc60.pdb
- vector.obj
- matrix.cpp
- matrix.h
- p1.cpp
- p2.cpp
- p3.cpp
- p4.asp
- p4.cpp
- set.cpp
- set.h
- Test.dsp
- Test.dsw
- Test.ncb
- Test.opt
- Test.plg
- vector.cpp
- vector.h
- Tema 5
- Test
- Debug
- Book.obj
- List.obj
- p1.obj
- p2.obj
- p3.obj
- Publication.obj
- Student.obj
- Test.exe
- Test.ilk
- Test.pch
- Test.pdb
- vc60.idb
- vc60.pdb
- Book.cpp
- Book.h
- Comparer.h
- GroupNameComparer.h
- GroupPointsComparer.h
- List.cpp
- List.h
- ListMore.h
- NameComparer.h
- p1.cpp
- p2.cpp
- p3.cpp
- PointsComparer.h
- Publication.cpp
- Publication.h
- start.cpp
- Student.cpp
- Student.h
- Students.in
- Students.out
- StudentsGroupName.out
- StudentsGroupPoints.out
- StudentsName.out
- StudentsPoints.out
- Test.dsp
- Test.dsw
- Test.ncb
- Test.opt
- Test.plg
- Tema 6
- Test
- Debug
- Container cu Figuri.exe
- Container cu Figuri.ilk
- Container cu Figuri.pch
- Container cu Figuri.pdb
- Figure.obj
- P2.obj
- punct.obj
- Square.obj
- vc60.idb
- vc60.pdb
- Backup.txt
- Circle.cpp
- Circle.h
- Container cu Figuri.dsp
- Container cu Figuri.dsw
- Container cu Figuri.ncb
- Container cu Figuri.opt
- Container cu Figuri.plg
- Container.cpp
- Container.h
- Figure.cpp
- Figure.h
- P2.CPP
- punct.cpp
- punct.h
- Square.cpp
- Square.h
- Teste.txt
- Tema 7
- Test
- Debug
- map.obj
- matrix.obj
- P_1.obj
- P_2.obj
- slist_base.obj
- Test.exe
- Test.ilk
- Test.pch
- Test.pdb
- vc60.idb
- vc60.pdb
- vector.obj
- map.cpp
- map.h
- matrix.cpp
- matrix.h
- P_1.CPP
- P_2.CPP
- Test.dsp
- Test.dsw
- Test.ncb
- Test.opt
- Test.plg
- vector.cpp
- vector.h
- Tema 8
- lucutz
- Debug
- probl1.obj
- tema8.exe
- tema8.ilk
- tema8.pch
- tema8.pdb
- vc60.idb
- vc60.pdb
- agenda.h
- contact.h
- data.txt
- my_book.tmp
- probl1.cpp
- tema8.dsp
- tema8.dsw
- tema8.ncb
- tema8.opt
- tema8.plg
- Test
- Debug
- contact.obj
- P_1.obj
- Test.exe
- Test.ilk
- Test.pch
- Test.pdb
- vc60.idb
- vc60.pdb
- contact.cpp
- contact.h
- P_1.CPP
- Test.dsp
- Test.dsw
- Test.ncb
- Test.opt
- Test.plg