Coder Baba
Kanalga Telegramβda oβtish
Everything about programming for beginners. 1 and only official telegram channel of CODERBABA India. Content: .NET Developer, Programming (ASP. NET, VB. NET, C#, SQL Server), & Projects follow me https://linktr.ee/coderbaba *Programming *Coding *Note
Ko'proq ko'rsatish2 312
Obunachilar
-124 soatlar
-67 kunlar
-3030 kunlar
Postlar arxiv
2 312
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
2 312
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
2 312
Type of Database
πππππ
https://www.instagram.com/p/CheBh8uB4xM/?utm_source=ig_web_copy_link
2 312
Difference Between Encapsulation And Abstraction In Object Oriented Programming in C#
2 312
What is a constructor in C#?
if you like this notes
Subscribe my youtube channel @coderbaba
Endi mavjud! Telegram Tadqiqoti 2025 β yilning asosiy insaytlari 
