Home > Back-end >  Of the new turn
Of the new turn

Time:09-24

CodePudding user response:

Don't debugging
 
Int a [15] {}, j=0; While (j<15) a [j]=j * 2, + + j. j=0; While (j<15) cout<(a [j] <10?" ":" ") & lt;

CodePudding user response:

Don't debugging
 
Char aa [47] {}; Cin> Aa; Int j=0; While (aa/j++!='\ 0'); - j;
Int jj=0; While (jj<- j) if (aa/jj++!=aa cout< [j]); <" No, j="jj; Else if (j<=cout< jj); <" Yes ";

CodePudding user response:

 # include 
using namespace std;
Const int LENGTH=15;

Int main ()
{
Int arr (LENGTH),//define array
//array element coupling numerical
for (int i=0; I & lt; LENGTH; + + I)
{
Arr [I]=I * 2;
}
for (int i=0; I & lt; LENGTH; + + I)
{
cout If ((I + 1) % 5==0)//if already output 5, the line feed
{
cout }
}
return 0;
}

VS2015 debugging c + +

CodePudding user response:

 # include 
using namespace std;
Bool IsPalinDrome (char * ch, int len);//judge whether palindrome function
Int main ()
{
If (IsPalinDrome (abcdcba, strlen (" abcdcba ")))
{
cout <"Abcdcba is a palindrome";
}
The else
{
cout <"Isn't abcdcba palindrome";
}
return 0;
}

Bool IsPalinDrome (char * ch, int len)//ch is to determine the string, len is the length of the string
{
for (int i=0; I & lt; Len. + + I)
{
If (ch [I]!=ch [len - 1 - I])
{
return false;//is not a palindrome, returns false
}
}
return true;//is a palindrome, return true
}

VS2015 debugging c + +

CodePudding user response:

reference 5 floor MianHou reply:
 # include 
using namespace std;
Bool IsPalinDrome (char * ch, int len);//judge whether palindrome function
Int main ()
{
If (IsPalinDrome (abcdcba, strlen (" abcdcba ")))
{
cout <"Abcdcba is a palindrome";
}
The else
{
cout <"Isn't abcdcba palindrome";
}
return 0;
}

Bool IsPalinDrome (char * ch, int len)//ch is to determine the string, len is the length of the string
{
for (int i=0; I & lt; Len. + + I)
{
If (ch [I]!=ch [len - 1 - I])
{
return false;//is not a palindrome, returns false
}
}
return true;//is a palindrome, return true
}

VS2015 debugging c + +

Thank you for your hard work

CodePudding user response:

reference 3 floor wise men know already should good karma response:

not debugging
 
Char aa [47] {}; Cin> Aa; Int j=0; While (aa/j++!='\ 0'); - j;
Int jj=0; While (jj<- j) if (aa/jj++!=aa cout< [j]); <" No, j="jj; Else if (j<=cout< jj); <" Yes ";

Thank you for your hard work
  • Related