Uploaded March 2025 | Updated November 2026, 1 hour ago
#coding #programming #cprogramming
// COMPOUND INTEREST CALCULATOR
double principal = 0.0;
double rate = 0.0;
int years = 0;
int timesCompounded = 0;
double total = 0.0;
printf("Compound Interest Calculator\n");
printf("Enter the principal (P): ");
scanf("%lf", &principal);
printf("Enter the interest rate % (r): ");
scanf("%lf", &rate);
rate = rate / 100;
printf("Enter the # of years (t): ");
scanf("%d", &years);
printf("Enter # of times compounded per year (n): ");
scanf("%d", ×Compounded);
total = principal * pow(1 + rate / timesCompounded, timesCompounded * years);
printf("After %d years, the total will be $%.2lf", years, total);
return 0;
#coding #programming #cprogramming
// COMPOUND INTEREST CALCULATOR
double principal = 0.0;
double rate = 0.0;
int years = 0;
int timesCompounded = 0;
double total = 0.0;
printf("Compound Interest Calculator\n");
printf("Enter the principal (P): ");
scanf("%lf", &principal);
printf("Enter the interest rate % (r): ");
scanf("%lf", &rate);
rate = rate / 100;
printf("Enter the # of years (t): ");
scanf("%d", &years);
printf("Enter # of times compounded per year (n): ");
scanf("%d", ×Compounded);
total = principal * pow(1 + rate / timesCompounded, timesCompounded * years);
printf("After %d years, the total will be $%.2lf", years, total);
return 0;
![Learn EXCEPTION HANDLING in 8 minutes! โ ๏ธ
#java #javatutorial #javacourse
import java.util.InputMismatchException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// Exception = An event that interrupts the normal flow of a program
// (Dividing by zero, file not found, mismatch input type)
// Surround any dangerous code with a try{} block
// try{}, catch{}, finally{}
try (Scanner scanner = new Scanner(System.in)) {
System.out.print(Enter a number: );
int number = scanner.nextInt();
System.out.println(number);
}
catch (InputMismatchException e) {
System.out.println(That wasnt a number!);
}
catch (ArithmeticException e) {
System.out.println(YOU CANT DIVIDE BY ZERO!);
}
catch (Exception e) {
// SAFETY NET
System.out.println(Something went wrong);
}
finally {
System.out.println(This always executes);
}
}
} Learn EXCEPTION HANDLING in 8 minutes! โ ๏ธ](https://i.ytimg.com/vi/u1PROb-aRUI/mqdefault.jpg)
![Learn the toString() method in 5 minutes! ๐
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// .toString() = Method inherited from the Object class.
// Used to return a string representation of an object.
// By default, it returns a hash code as a unique identifier.
// It can be overridden to provide meaningful details.
Car car1 = new Car(Ford, Mustang, 2025, Red);
Car car2 = new Car(Chevrolet, Corvette, 2026, Blue);
System.out.println(car1);
System.out.println(car2);
}
}
public class Car {
String make;
String model;
int year;
String color;
Car(String make, String model, int year, String color){
this.make = make;
this.model = model;
this.year = year;
this.color = color;
}
@Override
public String toString(){
return this.color + + this.year + + this.make + + this.model;
}
} Learn the toString() method in 5 minutes! ๐](https://i.ytimg.com/vi/u3BGdOunOTI/mqdefault.jpg)




![Learn 2D arrays in 8 minutes! โฌ
#coding #programming #cprogramming
// 2D array = An array where each element is an array
// array[][] = {{ }, { }, { }};
char numpad[][3] = {{1, 2, 3},
{4, 5, 6},
{7, 8, 9},
{*, 0, #}}; Learn 2D arrays in 8 minutes! โฌ](https://i.ytimg.com/vi/vpu09OPR61M/mqdefault.jpg)

![Learn Java arraylists in 9 minutes! ๐
#java #javatutorial #javacourse
00:00:00 example
00:05:16 exercise
import java.util.ArrayList;
import java.util.Collections;
public class Main {
public static void main(String[] args) {
// ArrayList = A resizeable array that stores objects (autoboxing)
// Arrays are fixed in size, but ArrayLists can change
}
} Learn Java arraylists in 9 minutes! ๐](https://i.ytimg.com/vi/wsTSREgCE5E/mqdefault.jpg)
![Lets code a mad libs game with C programming! ๐
#coding #programming #cprogramming
This is a beginners project to help you understand how to accept strings as user input.
// MAD LIBS GAME
char noun[50] = ;
char verb[50] = ;
char adjective1[50] = ;
char adjective2[50] = ;
char adjective3[50] = ;
printf(Enter an adjective (description): );
fgets(adjective1, sizeof(adjective1), stdin);
adjective1[strlen(adjective1) - 1] = 0;
printf(Enter a noun (animal or person): );
fgets(noun, sizeof(noun), stdin);
noun[strlen(noun) - 1] = 0;
printf(Enter an adjective (description): );
fgets(adjective2, sizeof(adjective2), stdin);
adjective2[strlen(adjective2) - 1] = 0;
printf(Enter a verb (ending w/ -ing): );
fgets(verb, sizeof(verb), stdin);
verb[strlen(verb) - 1] = 0;
printf(Enter an adjective (description): );
fgets(adjective3, sizeof(adjective3), stdin);
adjective3[strlen(adjective3) - 1] = 0;
printf(nToday I went to a %s zoo.n, adjective1);
printf(In an exhibit, I saw a %s.n, noun);
printf(%s was %s and %s!n, noun, adjective2, verb);
printf(I was %s!n, adjective3);
return 0; Lets code a mad libs game with C programming! ๐](https://i.ytimg.com/vi/wt194lO5kKE/mqdefault.jpg)
