Rename GoodString.cpp to adhishanand9.cpp

This commit is contained in:
Luke Oliff
2018-10-08 17:11:47 +01:00
committed by GitHub
parent ab9cb406db
commit 5fcd8ddb83

31
code/adhishanand9.cpp Normal file
View 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;
}