Rohit Jain
BAN USERI am Beginner In This field.
Comments (5)
Followers (1)
Reputation 15
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Nice its working....
- Rohit Jain November 04, 2014Comment hidden because of low score. Click to expand.
0
of 0 vote
we can do in C Language Easily...
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
int n,i,count=1;
char ch,str[20];
gets(str);
n=strlen(str);
for(i=0;i<n;i++){
if(str[i]==str[i+1])
count++;
else{
ch=str[i];
if(count==1)
printf("%c",ch);
else
printf("%c%d",ch,count);
count=1;
}
}
return 0;
}
Comment hidden because of low score. Click to expand.
0
of 0 vote
can you give me some more test cases.
- Rohit Jain November 04, 2014Comment hidden because of low score. Click to expand.
-1
of 1 vote
can you give me some more test cases.
- Rohit Jain November 04, 2014Page:
1
Repmoruytmeks, Airport service agent at Stratabiz
I am an airport service agent . I work in an airport , providing information and assistance to the flying public. In ...
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Another Solution In C
- Rohit Jain November 04, 2014