# Untitled

unknown
plain_text
7 months ago
1.8 kB
1
Indexable
Never
```// Name: Ally Jens
// Purpose: practicing the 3 kinds of loops
// Date: 9/22/23

#include <stdio.h>

int main (){

int numbers, oddOrEven, colum, row;

printf("(N)umbers\n");
printf("(D)raw\n");
printf("e(X)it\n");
printf("Enter the character of your selection: ");

break;
}
scanf("%d", &colum);

row = colum;

for(int i = 0; i < colum; i++){
for (int k = row - 1; k > 0; k--){
printf(" ");

}
row = row - 1;

for(int j = 0; j < i * 2 + 1; j++){
printf("*");

}

printf("\n");
}
}
do{
printf("Please enter a number (0 to stop) ");

scanf("%d", &numbers);

oddOrEven = numbers % 2;

if(oddOrEven == 0){
printf("%d is even.\n", numbers);
}
else{
printf("%d is odd.\n", numbers);
}

} while (numbers != 0);

}
else{

}

//scanf("%d", &colum);

//row = colum;

//for(int i = 0; i < colum; i++){
//	for (int k = row - 1; k > 0; k--){
//		printf(" ");

//	}
//	row = row - 1;

//	for(int j = 0; j < i * 2 + 1; j++){
//		printf("*");

//	}

//	printf("\n");
//}

//do{
//	printf("Please enter a number (0 to stop) ");

//	scanf("%d", &numbers);

//	oddOrEven = numbers % 2;

//	if(oddOrEven == 0){
//		printf("%d is even.\n", numbers);
//	}
//	else{
//		printf("%d is odd.\n", numbers);
//	}

//} while (numbers != 0);

}

return 0;
}

return 0;
}```