Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Let's code an interest calculator with C programming! ๐Ÿ’ฐ
Play lesson

C tutorial for beginners โš™๏ธ - Let's code an interest calculator with C programming! ๐Ÿ’ฐ

4.0 (0)
13 learners

What you'll learn

This course includes

  • 6.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#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", &timesCompounded); total = principal * pow(1 + rate / timesCompounded, timesCompounded * years); printf("After %d years, the total will be $%.2lf", years, total); return 0;

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere