sami sam

sami sam

  • NA
  • 40
  • 30.3k

I do not know how let this C program run correctly

Aug 21 2012 4:30 AM
#include <stdio.h>
char s[80];
int i, j,n;

int main() {
   printf("Type in a word: "); 
   scanf("%s",s);
   printf("Type in a number: ");
   scanf("%d",&n);
   i = 0;
   j = strlen -1;
   while (i < j) {
printf("%c",s[i]);
i = i + n;
   }
}

Answers (5)