When should I use static in C#?
What is datagrid c#?
Is predicate a functional interface?
What is stack and heap?
How to reduce image resolution in C#?
7.What are typed data set?
Is c# easier than javascript?
Explain about Serialize and MarshalByRef?
hi, I am a begineer to c sharp. I have written a code for finding out prime numbers. Can anyone identify what are the flaws in my code. Kindly donot complex the code or present logic because i am new to c sharp and just started learning programming language.Thanks in advance. class Program { static void Main(string[] args) { int a,b=1; a = int.Parse(Console.ReadLine()); c= int.Parse(Console.ReadLine()); if (a % b == 0 && a % 2 != 0 && a % a == 0) Console.WriteLine(a); else if (a % b == 0 && a % 2 == 0) Console.WriteLine(a%2); Console.WriteLine("Number is not PRIME"); Console.ReadLine(); } } }
What are the examples of data types?
Are classes passed by reference in c#?
What does int32 mean?
What are the types of access modifiers?