mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2025-07-30 13:30:16 +00:00
Rename GoodString.cpp to adhishanand9.cpp
This commit is contained in:
31
code/adhishanand9.cpp
Normal file
31
code/adhishanand9.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#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;
|
||||
}
|
Reference in New Issue
Block a user