0% found this document useful (0 votes)
1 views2 pages

Week 3

The document provides definitions and examples of various mathematical concepts including palindrome numbers, Armstrong numbers, Fibonacci series, and prime numbers. It also covers matrix operations in C programming, detailing how to add, multiply, and transpose matrices. Each concept is explained with examples to illustrate the principles involved.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views2 pages

Week 3

The document provides definitions and examples of various mathematical concepts including palindrome numbers, Armstrong numbers, Fibonacci series, and prime numbers. It also covers matrix operations in C programming, detailing how to add, multiply, and transpose matrices. Each concept is explained with examples to illustrate the principles involved.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Week 3:

Palindrome:

Description: A palindrome number is a number that is same after reverse.


For example 121, 34543, 343, 131, 48984 are the palindrome numbers.

Armstrong Number:

Description:

Armstrong number is a number that is equal to the sum of cubes of its digits.
For example 0, 1, 153, 370, 371 and 407 are the Armstrong numbers.
Let's try to understand why 153 is an Armstrong number.
153 = (1*1*1)+(5*5*5)+(3*3*3)
where:
(1*1*1)=1
(5*5*5)=125
(3*3*3)=27
So:
1+125+27=153

Fibonacci Series:
Description:

Fibonacci Series in C: In case of fibonacci series, next number is the sum of


previous two numbers for example 0, 1, 1, 2, 3, 5, 8, 13, 21 etc. The first two
numbers of fibonacci series are 0 and 1.

Prime or not:
Description:

Prime number in C: Prime number is a number that is greater than 1 and


divided by 1 or itself. In other words, prime numbers can't be divided by other
numbers than itself or 1. For example 2, 3, 5, 7, 11, 13, 17, 19, 23.... are the
prime numbers.

1
Week 6:

Addition of a Matrix:

Description:

To add any two matrices in C programming, you have to ask the user to enter all
elements of both matrices. Now start adding the two matrices together to form a
new matrix. After adding two matrices, display the third matrix, which is the
addition result of the two matrices

Multiplication of a Matrix:

Description:

we are taking input from the user for row number, column number, first matrix
elements and second matrix elements. Then we are performing multiplication
on the matrices entered by the user.

In matrix multiplication first matrix one row element is multiplied by second


matrix all column elements.

Transpose of a Square Matrix:

Description:

In linear algebra, the transpose of a matrix is a new matrix that is obtained by


interchanging its rows and columns. For example, if we have a matrix A with
dimensions m x n, then its transpose AT will have dimensions n x m.

To transpose a matrix in C programming language, we can follow the following


steps:

Declare the matrix: First, we need to declare a two-dimensional array to


represent our matrix. We can do this by specifying the number of rows and
columns as follows:

int matrix[m][n];

Here, m and n represent the number of rows and columns, respectively.

Initialize the matrix: Next, we need to initialize the matrix with some values.

You might also like