C Program to Calculate Factorial
01/13/2025 11:29 PM#include <stdio.h>
int main() {
int n, factorial;
factorial = 1;
printf("Enter n: ");
scanf("%d", &n);
Event and Count Controlled Loops in C
01/13/2025 11:10 PM#include <stdio.h>
int main() {
float invest = 1000;
int num_years = 0;
while(invest < 2000) {
invest = invest + (invest * 0.05);
printf("Investment = %0.2f\n", invest);
Counting A and B Students Based on Grades
01/13/2025 10:59 PM#include <stdio.h>
int main() {
int i;
int grade;
int a_students = 0;
int b_students = 0;
for (i = 0; i < 10; i++) {
Simple Looping Example in C (While)
01/13/2025 10:47 PM#include <stdio.h>
int main() {
int x = 1;
while(x != 0) {
printf("Enter X (while): ");
scanf("%d", &x);
}
Basic Switch Statement Example in C
01/13/2025 10:32 PM#include <stdio.h>
int main() {
int x;
printf("Please enter X: ");
scanf("%d", &x);
switch(x) {
Aircraft Classifier (IF Condition)
01/13/2025 10:17 PM#include <stdio.h>
int main() {
int speed;
int length;
printf("Please enter speed: ");
scanf("%d", &speed);
printf("Please enter length: ");