A PHP Error was encountered

Severity: Warning

Message: mkdir(): Permission denied

Filename: drivers/Session_files_driver.php

Line Number: 137

Backtrace:

File: /home/estarbk/public_html/dev.estar-bk.com/application/controllers/Main.php
Line: 8
Function: __construct

File: /home/estarbk/public_html/dev.estar-bk.com/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Failed to initialize storage module: user (path: /var/cpanel/php/sessions/alt-php74)

Filename: Session/Session.php

Line Number: 137

Backtrace:

File: /home/estarbk/public_html/dev.estar-bk.com/application/controllers/Main.php
Line: 8
Function: __construct

File: /home/estarbk/public_html/dev.estar-bk.com/index.php
Line: 315
Function: require_once

E-STAR - Student
E-Lecture - Divide using Modular Arithmetic

In modular arithmetic, the numbers we are dealing with are just integers and the operations used are addition, subtraction, multiplication and division.

We say a|b “a divides b” if there exists an integer c such that b = ac.

Euclid’s Division Algorithm

Let a be any integer and d be a positive integer. Then, there exists unique q and r (0 ≤ r < d) such that

a = dq + r.

d is called the divisor, a is called the dividend, q is called the quotient and r is called the remainder.

Modular Arithmetic

Let a be any integer and d be a positive integer. If a = dq + r, then a mod d = r.