2. Agenda
If condition.
Operators.
Steps to make a good program.
Simple calculator.
Functions.
Where we are now & what`s our aim.
Windows 8 applications.
Windows phone applications.
Universal applications.
Our first universal app.
3. Shopping problem !
Go and buy me pepsi, If you didn`t find pepsi, buy me juice, if you didn`t find juice
return home and don`t buy any thing.
4. Shopping problem !
Pseudo code
If ( You find Pepsi)
Buy Pepsi
Else if (You find juice )
Buy juice
Else
Return home
5. If structure
If ( Condition )
Action ;
Else if ( Condition )
Action ;
Else if ( Condition) )
Action ;
.
.
.
Else
Action ;
19. While Loop FOR Loop
int x =0;
While (x < 10)
{
Console.WriteLine(x)
;
X++;
}
for ( int x = 0;x < 10 ;
x++)
{
Console.WriteLine(x);
}
20. Power
static void Main(string[] args)
{
double number;int power;
number = double.Parse(Console.ReadLine());
power = int.Parse(Console.ReadLine());
double x = number;
for (int z = 1; z < power; z++)
{
number *= x;
}
Console.WriteLine(number);
Console.ReadKey();
}
}