示例#1
0
int main(){
	char str[]="GEEKSFORGEEKS";
	int len=strlen(str);
	int n=3;
	printZigZag(str,len,n);
	printf("\n");
	return 0;
}
示例#2
0
int main() {

	int *input1, *input2;
	input1 = (int *) malloc(sizeof(int));
	input2 = (int *) malloc(sizeof(int));

	printf("Please enter the width of the zig zag: ");
	do {
		(scanf("%d", input1));
	} while (*input1 < 1);
	printf("\n");

	printf("Please enter the number of round trips: ");
	do {
		(scanf("%d", input2));
	} while (*input2 < 1);
	printf("\n");

	printZigZag(*input1, *input2);
}