C in 100 Seconds: Arithmetic Operators | Episode 4

2views
00
2:23
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
Five operators in 100 seconds. Add, subtract, multiply, divide, modulo. Plus the integer division trap — 17 / 5 is 3 in C, not 3.4. When both sides are int, C drops the decimal. Use 17.0 to get a float result. The modulo operator gives the remainder — 17 % 5 is 2. Student code: https://github.com/GoCelesteAI/c-in-100-seconds/tree/main/episode04 What You'll Learn: • + add, - subtract, * multiply • / divide — integer division truncates the decimal • % modulo — the remainder after division • 17 / 5 = 3 but 17.0 / 5 = 3.4 • %% in printf to print a literal percent sign Next: Episode 5 — If / Else #c #programming #100seconds #learnc #arithmetic #operators #integerdivision #modulo #tutorial Tags c arithmetic, c operators, integer division c, modulo c, c math, c tutorial 2026, c beginner, 100 seconds, learn c, coding tutorial

Tags

c arithmeticc operatorsinteger division cmodulo cc mathc tutorial 2026c beginner100 secondslearn ccoding tutorial
Back to tutorials

Duration

2:23

Published

April 6, 2026

Added to Codegiz

April 8, 2026

Open in YouTube