Muhammed Ashiq
BAN USER
This is a code
#include <iostream>
#include <string>
using namespace std;
string compressString(string);
int main(){
string str="Ashiq assdewfefkljhdsklfdsklkljlkjklll";
cout<<str<<" : "<<compressString(str)<<endl;
return 0;
}
string compressString(string data){
string result="";
if(data.length()<1) return result;
int count=1;
for(int index = 0; index < data.length()-1; index++){
if(data.at(index) != data.at(index+1)){
result +=to_string(count)+data.at(index);
count=1;
}
else count++;
}
result +=to_string(count)+data.at(data.length()-1);
return result;
}
#include <iostream>
#include <string>
using namespace std;
string compressString(string);
int main(){
string str="Ashiq assdewfefkljhdsklfdsklkljlkjklll";
cout<<str<<" : "<<compressString(str)<<endl;
return 0;
}
string compressString(string data){
string result="";
if(data.length()<1) return result;
int count=1;
for(int index = 0; index < data.length()-1; index++){
if(data.at(index) != data.at(index+1)){
result +=to_string(count)+data.at(index);
count=1;
}
else count++;
}
result +=to_string(count)+data.at(data.length()-1);
return result;
}
void generatePattern(const int number){
for(int row = 1; row < number ; row++){
for(int column = 1; column <= number; column++){
if(column == 1) {
if(row % 2 == 1 ) cout<<row<<" ";
else cout<<row+1<<" ";
} else if (column == number){
if(row % 2 == 1) cout<<row + 1<<" ";
else cout<<row<<" ";
} else {
cout<<row<<" ";
}
}
cout<<endl;
}
}
Repcinderellagale, Financial Application Engineer at Continental
Working as a Forecasting Analyst at Thorofare for more than three years. There, I am responsible for developing detailed business ...
RepMaryGriffith, Cloud Support Associate at Auto NInja
I am Mary , have graduated with marketing specialization and I am passionate about Internet Marketing and Social Media. Creates business ...
RepZoeParker, Java Experienced at Abs india pvt. ltd.
I am Zoe , a Security Analyst with a record of success in completing financial market research and conducting earnings estimates ...
Repnp810929, Product Security Engineer at Absolute Softech Ltd
I am Neesha , a Creative news writer with 3+ years of experience at Audio Visions. Great storytelling skills and a ...
RepViennaJones, Reporter at Precious Moments
Experienced project manager and capable supervisor of a team of writers, reporters, illustrators, graphic artists, and other staff members. I ...
RepAadavKiva, abc at 8x8
By profession I am a blogger and passionate about writing new and informative blog content who easily understand visitors. Nowaday ...
Repjj2234971, Applications Developer at ABC TECH SUPPORT
My role for teaching students in a particular subject area. I specialize in a variety of subjects and fields. such ...
Repjaynebackus, Applications Developer at Achieve Internet
I am Jayne And I am working as a Record center clerk in a company. Also I'm doing a ...
RepManbirTaylor, abc at 247quickbookshelp
I have strong communication skills that have been developed over a customer service career of nearly 3 years. I have ...