C-plus-plus

cout<<"Hello World";

Hello World

Welcome to C++ outputs

Arithmetic operation output

alt text

Copy Constructor output

alt text

Default Constructor output

alt text

Greatest among three numbers output

alt text

push and pop output

alt text

Reverse String output

akt text

Bi-Implication

Bi-Implication: The bi-implication of p and q, denoted in mathematics by p⟺q, is short hand for the statement "p if and only if q". As such, bi-implication requires q to be True only when p is True. In other words, bi-implication fails (is False) when p is True and q is False or when p is False and q is True.

alt text

Conjunction

Conjunction: A conjunction is a statement formed by adding two statements with the connector AND. The symbol for conjunction is '∧' which can be read as 'and'. When two statements p and q are joined in a statement, the conjunction will be expressed symbolically as p ∧ q. Conjunction is true when both statements are true, otherwise false.

alt text

Bank Account creating class Account with data member's acc_no, balance and min_balance(static)

alt text

Fuzzy set

Fuzzy set: Fuzzy refers to something that is unclear or vague. Hence, Fuzzy Set is a Set where every key is associated with value, which is between 0 to 1 based on the certainty .This value is often called as degree of membership. Fuzzy Set is denoted with a Tilde Sign on top of the normal Set notation. Operations on Fuzzy Set with Code :

  1. Union: Consider 2 Fuzzy Sets denoted by A and B, then let’s consider Y be the Union of them, then for every member of A and B, Y will be: Degree of membership(Y)= max(degree of membership(A), degree of membership(B)) For e.g: A = { ( 1 , 0.3 ) ,( 2 , 0.7 ) } and B = { ( 2 , 0.4 ) ,( 3 , 0.6 ) ,( 4 , 0.8 ) } union = { ( 1 , 0.3 ) ,( 2 , 0.7 ) ,( 3 , 0.6 ) ,( 4 , 0.8 ) }
  2. Intersection: Consider 2 Fuzzy Sets denoted by A and B, then let’s consider Y be the Intersection of them, then for every member of A and B, Y will be: Degree of membership(Y)= min(degree of membership(A), degree of membership(B)) A = { ( 1 , 0.3 ) ,( 2 , 0.7 ) } and B = { ( 2 , 0.4 ) ,( 3 , 0.6 ) ,( 4 , 0.8 ) } Intersection ={ ( 2 , 0.4 ) } 3.Complement: Consider a Fuzzy Sets denoted by A , then let’s consider Y be the Complement of it, then for every member of A , Y will be: Degree of membership(Y)= 1 – degree of membership(A) A = { ( 1 , 0.3 ) ,( 2 , 0.7 ) } and B = { ( 2 , 0.4 ) ,( 3 , 0.6 ) ,( 4 , 0.8 ) } COMPLEMENT OF A = { ( 1 , 0.7 ) ,( 2 , 0.3 ) } COMPLEMENT OF B = { ( 2 , 0.6 ) ,( 3 , 0.4 ) ,( 4 , 0.2 ) }

alt text

Euclidean algorithm

//WAP to display extended euclidean algo or Bezout's identity. alt text

Floor and celing function

Floor function In mathematics and computer science, the floor function is the function that takes as input a real number x, and gives as output the greatest integer less than or equal to x, denoted ⌊x⌋ or floor(x). For example, ⌊3.4⌋ = 3, ⌊−3.4⌋ = −4. Ceiling function Similarly, the ceiling function maps x to the least integer greater than or equal to x, denoted ⌈x⌉ or ceil(x). For example, ⌈2.4⌉ = 3, and ⌈−2.4⌉ = −2.

alt text

Boolean Matrix Operation

Boolean matrix operations are mathematical operations that can be performed on matrices (arrays of numbers) using Boolean logic (true/false values). Some common Boolean matrix operations include meet, join and product. These operations can be used to create new matrices from existing ones, or to manipulate the values within a matrix based on certain conditions. alt text