Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class PrintSequenceStef
- {
- static void Main()
- {
- //в случая for цикъла прави почти същото като do-while i while циклите
- for (int a = 2; a < 20; a++)
- {
- if (a % 2 == 0)
- {
- Console.WriteLine("{0}", a);
- }
- else
- {
- Console.WriteLine("{0}", a*(-1));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement