U E D R , A S I H C RSS

문자반대출력/남도연

~cpp 
--------<sasa.h>-------------
class Mirror{
private:

	char munja[14];

public:
	void reverse();
	void input();
};
------<sasa2.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;
	
}
-------<sasa3.cpp>--------
~cpp 
#include "sasa.h"


void main(){
	Mirror count;
	count.input();
	count.reverse();
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:29
Processing time 0.0204 sec