mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2024-11-01 04:07:48 +00:00
32 lines
436 B
C++
32 lines
436 B
C++
|
#include <iostream>
|
||
|
#include <string>
|
||
|
#include<stdio.h>
|
||
|
#include<cstring>
|
||
|
using namespace std;
|
||
|
class GoodString
|
||
|
{
|
||
|
int t;
|
||
|
public:
|
||
|
GoodString(int x)
|
||
|
{
|
||
|
t=x;
|
||
|
}
|
||
|
|
||
|
void newstring(string str)
|
||
|
{
|
||
|
for(int i=0;i<t;i++)
|
||
|
cout<<str.at(i);
|
||
|
}
|
||
|
};
|
||
|
int main ()
|
||
|
{
|
||
|
int n;
|
||
|
cin>>n;
|
||
|
GoodString ob(n);
|
||
|
string str;
|
||
|
getchar();
|
||
|
getline(cin,str);
|
||
|
ob.newstring(str);
|
||
|
return 0;
|
||
|
}
|