Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class PrintSequence
- {
- static void Main()
- {
- Console.WriteLine("The first ten members of sequence are: ");
- for(int i=2;i<=11;i++)
- {
- if(i%2==0)
- {
- Console.WriteLine(i);
- }
- else
- {
- Console.WriteLine(-i);
- }
- }
- Console.WriteLine();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement