While loop can execute code block as long as condition not reached.
Loops are handy because they save time, reduce errors, and they make code more readable.
Note: Do not use the wrong condition, otherwise the loop will never end!
.
.
.
#programming#codewiring
First Statement ( int x=0 ) is executed one time before execution of code block.
Second Statement (x<5) defines the condition for executing the code block.
Third Statement (x++) is executed every time after execution of code block.
.
.
.
#programming#csharp#forloop#codewiring
C# supports the usual logical conditions:
a < b, a<= b, a > b, a >= b, a == b, a != b
If statement used to execute a block of code if condition will be true and else statement do the opposite.
.
.
.
#programming#csharp#conditions#ifstatement#ifelse#codewiring
How to take input in C Sharp?
Console.Readline() mostly used for taking input in C Sharp.
By Default, it takes input in string. To store input value in any other datatype, we have to parse input in that datatype otherwise it will give an error
.
.
#prorgamming#csharp#codewiring
Your first simple ADDITION PROGRAM in c sharp:
1. Declare two variables of int/float/long/double datatype.
2. Do addition method on variables and store the sum in third variable (or in already declared variable).
3. Print output.
.
.
.
.
#programming#additionprogram#csharp
Want to start coding in C#?
Skeleton gives no output?
No problem like every programmer, you can also start with Hello World program!
Don't forget skeleton code before this (last post)
.
.
.
.
#programming#csharp#helloworld#helloworldprogram#codewiring
These Algorithms are so difficult?
Want to learn a language from scratch?
No problem! We have a solution ⚡️
Starting C# posts for beginners...
To learn C# Follow us to Stay Tuned.
.
.
.
#csharp#codewiring#programming#algorithms