+ 4
Anybody please help me to solve this extra terrestials code challenge My code below is failing in 2test cases
2 Respuestas
+ 1
#include<iostream>
using namespace std;
int main(){
char *h=new char;
char *g=new char[40];
cin>>h;
int sum=0;
int tr=1;
for(int w=0;w<=40;w++){
for(char k='a';k<='z';k++){
if(*(h+w)==k){
sum+=tr;
}
else{
continue;
}
}
}
sum-=1;
for(int r=0;r<=sum;sum--)
{
cout<<*(h+sum);
}
}
+ 3
Thanks but I want that in C Language