No older revisions available
No older revisions available
~cpp --------<sasa.h>------------- class Mirror{ private: char munja[14]; public: void reverse(); void input(); };
------<sasa2.cpp>----------
<sasa3.cpp>--------
~cpp #include <math.h> #include <iostream.h> #include "sasa.h" #include <string.h> #include <stdlib.h> void Mirror::input(){ cin.getline(munja, 14, '\n'); } void Mirror::reverse(){ int i; char space; for (i=0;i<floor(strlen(munja)/2);i++){ space=munja[strlen(munja)-1-i]; munja[strlen(munja)-1-i]=munja[i]; munja[i]=space; } cout<<munja<<endl; }-------
~cpp #include "sasa.h" void main(){ Mirror count; count.input(); count.reverse(); }