<address id="ousso"></address>
<form id="ousso"><track id="ousso"><big id="ousso"></big></track></form>
  1. 揚智科技軟件筆試題目第10題答案

    時間:2020-11-16 16:55:24 筆試題目 我要投稿

    揚智(科技)軟件筆試題目第10題答案

    第10題為:
    10.Write a recursive function that tests wether a string is a palindrome.
    A palindrome is s string such as "abcba" or "otto" that reads the same in
    both directions.If you can write this function recursively,you can write
    an iterative version of this function instead.

    揚智(科技)軟件筆試題目第10題答案

    #include
    #include
    int count=0;//記錄遞歸函數中字符串縮短的總次數,可以不要這個。
    recp(char s[])//回文的.遞歸函數
    {
    int i;
    if(strlen(s)==1)//長度為1
    return 1;
    else if(strlen(s)==2)長度為2的情況
    {
    if(s[0]==s[1])
    return 1;
    else
    return 0;
    }
    else if(s[0]==s[strlen(s)-1])
    {
    count++;
    cout<<"The "< char t[]="abcdeabcd";
    int svalue,tvalue;
    svalue=recp(s);
    tvalue=recp(t);
    cout<<"the value of string s is:"< cout<<"the value of string t is:"<}
    在Visual C++6.0中通過。
     

     

    【揚智(科技)軟件筆試題目第10題答案】相關文章:

    英智興達軟件測試筆試題目11-20

    楓葉軟件筆試題目與答案11-19

    軟件測試筆試題目及答案09-18

    軟件測試筆試題目(含答案)11-20

    精選軟件測試筆試題目及答案06-23

    AutoCAD筆試題目真題和答案12-08

    深圳嘉訊軟件科技有限公司筆試題目11-14

    軟件測試常見筆試題目07-31

    傲盾軟件筆試題目11-19

    面試筆試題目規律題及答案08-03

    <address id="ousso"></address>
    <form id="ousso"><track id="ousso"><big id="ousso"></big></track></form>
    1. 日日做夜狠狠爱欧美黑人