#include <stdio.h>
//---------------------------------------------------------------------------
//间隔输出指定字符串
#pragma argsused
int main(int argc, char* argv[])
{
char str[]="Computer Science";
char *p = str;
int flg = 1;
while(*p)
{
if(flg!=0)
{
printf("%c", *p);
}
flg = (flg+1)%2;
p++;
}
printf("\n End.");
return 0;
}
//---------------------------------------------------------------------------
【华为面试题】间隔输出指定字符串
最新推荐文章于 2024-08-29 12:23:11 发布