if (age > 18 || no < 11) a = 25;
int i = 0, j = 0; label: i++; j+=i; if (i < 10) { Console.Write(i +" "); goto label; }
int a; String res; if (a % 2 == 0) res = "Even"; else res = "Odd";
int a; String res; if (a Mod 2 == 0) res = "Even"; else res = "Odd";
int a; Console.WriteLine(a Mod 2 == 0? "Even": "Odd");
int a; String res; a % 2 == 0? res = "Even" : res = "Odd"; Console.WriteLine(res);
char[ ] arr = new char[ ] {'k', 'i','C', 'i','t'} ;
do
{
Console.WriteLine((char) i);
}
while (int i = 0; i < arr; i++);
foreach (int i in arr)
{
Console.WriteLine((char) i);
}
for (int i = 0; i < arr; i++)
{
Console.WriteLine((char) i);
}
while (int i = 0; i < arr; i++)
{
Console.WriteLine((char) i);
}
do
{
Console.WriteLine((char) i);
}
until (int i = 0; i < arr; i++);
foreach (int i in arr)
{
Console.WriteLine((char) i);
}
int i = 20 ; for( ; ; ) { Console.Write(i + " "); if (i >= -10) i -= 4; else break; }
if (Condition1)
{// Some statement}
if (Condition1) {// Some statement}
else {// Some statement}
if (Condition1) {// Some statement}
else {// Some statement}
else if ( Condition2){//Some statement}
if ( Condition1 ) {// Some statement}
else if ( Condition2 ) {// Some statement}
else {// Some statement}
if ( Condition1 ) {// Some statement}
else if ( Condition2 ) {// Some statement}
else if ( Condition3 ) {// Some statement}
else {// Some statement}
if (Condition1) {// Some statement}
else {// Some statement}
else if ( Condition2){//Some statement}
int i = 1, j = 1, val; while (i < 25) { Console.Write(j + " "); val = i + j; j = i; i = val; }
namespace CuriousTabConsoleApplication { class SampleProgram { static void Main(string[] args) { int a = 5; int s = 0, c = 0; Proc(a, ref s, ref c); Console.WriteLine(s + " " + c); } static void Proc(int x, ref int ss, ref int cc) { ss = x * x; cc = x * x * x; } } }
decimal static fun(int i, Single j, double k)
{ ... }
decimal fun(int i, Single j, double k)
{ ... }
static decimal fun(int i, Single j, double k)
{ ... }
static decimal fun(int i, Single j, double k) decimal
{ ... }
static fun(int i, Single j, double k)
{
...
return decimal;
}
static decimal fun(int i, Single j, double k)
{ ... }
namespace CuriousTabConsoleApplication { class SampleProgram { static void Main(string[ ] args) { int a = 5; int s = 0, c = 0; s, c = fun(a); Console.WriteLine(s +" " + c) ; } static int fun(int x) { int ss, cc; ss = x * x; cc = x * x * x; return ss, cc; } } }
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.