將字符串computer賦給一個數組然后從第一個字母開始間隔輸出?
#include<stdio.h>#include<string.h>voidIntervalStr(char*pStr,intnLen){for(inti=0;i<nLen;i+=2){printf("%c",pStr[i]);}}intmain(intargc,charargv[]){characBuf[16]="computer";IntervalStr(acBuf,strlen(acBuf));return0;}
將字符串computer賦給一個數組然后從第一個字母開始間隔輸出?
#include<stdio.h>#include<string.h>voidIntervalStr(char*pStr,intnLen){for(inti=0;i<nLen;i+=2){printf("%c",pStr[i]);}}intmain(intargc,charargv[]){characBuf[16]="computer";IntervalStr(acBuf,strlen(acBuf));return0;}