Merge pull request #299 from adhishanand9/master

Added GoodString Code
This commit is contained in:
Luke Oliff 2018-10-08 09:12:03 -07:00 committed by GitHub
commit 7a440e8066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 0 deletions

View File

@ -68,6 +68,16 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU
- [![twitter-alt][twitter-img]](https://twitter.com/adeonir) - [![twitter-alt][twitter-img]](https://twitter.com/adeonir)
[![github-alt][github-img]](https://github.com/adeonir) [![github-alt][github-img]](https://github.com/adeonir)
### Adhish Anand
- Student, Chitkara University
- Self-taught Developer, Aspiring Entreprenuer
- I am currently work on:
- Android Development
- Python
- Machine Learning
- [![github-alt][github-img]](https://github.com/adhishanand9)
### Aditya Choudhary ### Aditya Choudhary
- Software Engineer in India - Software Engineer in India
- [![twitter-alt][twitter-img]](https://twitter.com/webmasteradi) - [![twitter-alt][twitter-img]](https://twitter.com/webmasteradi)

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;
}