Difference_Between_Encapsulation_And_Abstraction_In_Object_Oriented.pdf
537.5 KB
Difference Between Encapsulation And Abstraction In Object Oriented Programming in C#
What is SQL?
It is a non-procedural language that is used to communicate with any database such as Oracle, SQL Server, etc.
This Language was developed by the German Scientist Mr. E.F.Codd in 1968
ANSI (American National Standard Institute) approved this concept and in 1972 SQL was released into the market
SQL is also called Sequel it stands for Structured English Query Language,
The sequel will provide a common language interface facility it means that a sequel is a language that can communicate with any type of database such as SQL Server, Oracle, MySQL, Sybase, BD2, etc.
SQL is not a case-sensitive language it means that all the commands of SQL are not case sensitive
Every command of SQL should end with a semicolon (;) (It is optional for SQL Server)
SQL can be called NLI (Natural Language Interface). It means that all the SQL Commands are almost similar to normal English language.
Subscribe My Youtube channel:
www.youtube.com/coderbaba
It is a non-procedural language that is used to communicate with any database such as Oracle, SQL Server, etc.
This Language was developed by the German Scientist Mr. E.F.Codd in 1968
ANSI (American National Standard Institute) approved this concept and in 1972 SQL was released into the market
SQL is also called Sequel it stands for Structured English Query Language,
The sequel will provide a common language interface facility it means that a sequel is a language that can communicate with any type of database such as SQL Server, Oracle, MySQL, Sybase, BD2, etc.
SQL is not a case-sensitive language it means that all the commands of SQL are not case sensitive
Every command of SQL should end with a semicolon (;) (It is optional for SQL Server)
SQL can be called NLI (Natural Language Interface). It means that all the SQL Commands are almost similar to normal English language.
Subscribe My Youtube channel:
www.youtube.com/coderbaba
Prime Numbers in C# with Examples:
————————————————————
number that should be greater than 1 and it only is divided by 1 and itself. For example, 2, 3, 5, 7, 11, 13, 17, 19, 23…., are the prime numbers.
How to check if a given number is prime or not in C#?:
———
using System;
namespace LogicalPrograms
{
public class Program
{
static void Main(string[] args)
{
Console.Write("Enter a Number : ");
int number = int.Parse(Console.ReadLine());
bool IsPrime = true;
for (int i = 2; i < number/2; i++)
{
if (number % i == 0)
{
IsPrime = false;
break;
}
}
if (IsPrime)
{
Console.Write("Number is Prime.");
}
else
{
Console.Write("Number is not Prime.");
}
Console.ReadKey();
}
}
}
————————————output———————————-
Enter a number 19
Number is Prime
Prints the Prime Numbers between a range of numbers in C#?:-
——————-
using System;
namespace LogicalPrograms
{
public class Program
{
static void Main(string[] args)
{
Console.Write("Enter The Start Number: ");
int startNumber = int.Parse(Console.ReadLine());
Console.Write("Enter the End Number : ");
int endNumber = Convert.ToInt32(Console.ReadLine());
Console.WriteLine($"The Prime Numbers between {startNumber} and {endNumber} are : ");
for (int i = startNumber; i <= endNumber; i++)
{
int counter = 0;
for (int j = 2; j <= i / 2; j++)
{
if (i % j == 0)
{
counter++;
break;
}
}
if (counter == 0 && i != 1)
{
Console.Write("{0} ", i);
}
}
Console.ReadKey();
}
}
}
————————————————output——————-
Enter the start number:1
enter the end number:20
The prime numbers between 1 and 20 are:
2 3 5 7 11 13 17 19
Subscribe #coderbaba
www.youtube.com/coderbaba
————————————————————
number that should be greater than 1 and it only is divided by 1 and itself. For example, 2, 3, 5, 7, 11, 13, 17, 19, 23…., are the prime numbers.
How to check if a given number is prime or not in C#?:
———
using System;
namespace LogicalPrograms
{
public class Program
{
static void Main(string[] args)
{
Console.Write("Enter a Number : ");
int number = int.Parse(Console.ReadLine());
bool IsPrime = true;
for (int i = 2; i < number/2; i++)
{
if (number % i == 0)
{
IsPrime = false;
break;
}
}
if (IsPrime)
{
Console.Write("Number is Prime.");
}
else
{
Console.Write("Number is not Prime.");
}
Console.ReadKey();
}
}
}
————————————output———————————-
Enter a number 19
Number is Prime
Prints the Prime Numbers between a range of numbers in C#?:-
——————-
using System;
namespace LogicalPrograms
{
public class Program
{
static void Main(string[] args)
{
Console.Write("Enter The Start Number: ");
int startNumber = int.Parse(Console.ReadLine());
Console.Write("Enter the End Number : ");
int endNumber = Convert.ToInt32(Console.ReadLine());
Console.WriteLine($"The Prime Numbers between {startNumber} and {endNumber} are : ");
for (int i = startNumber; i <= endNumber; i++)
{
int counter = 0;
for (int j = 2; j <= i / 2; j++)
{
if (i % j == 0)
{
counter++;
break;
}
}
if (counter == 0 && i != 1)
{
Console.Write("{0} ", i);
}
}
Console.ReadKey();
}
}
}
————————————————output——————-
Enter the start number:1
enter the end number:20
The prime numbers between 1 and 20 are:
2 3 5 7 11 13 17 19
Subscribe #coderbaba
www.youtube.com/coderbaba