Yachkov

even powers of 2

Jan 31st, 2021
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 KB | None | 0 0
  1.  
  2.  
  3. using System;
  4. using System.ComponentModel;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.ComponentModel.Design;
  7. using System.Globalization;
  8. using System.Net.Http.Headers;
  9. using System.Reflection;
  10. using System.Runtime.ConstrainedExecution;
  11. using System.Security.Cryptography;
  12.  
  13. namespace SomeExcercises
  14. {
  15.     class Program
  16.     {
  17.         static void Main(string[] args)
  18.         {
  19.             int n = int.Parse(Console.ReadLine());
  20.  
  21.             for (int power = 0; power <= n; power += 2)
  22.             {
  23.                 Console.WriteLine(Math.Pow(2, power));
  24.             }
  25.         }
  26.     }
  27. }
  28.  
  29.  
  30.  
  31.  
  32.  
Advertisement
Add Comment
Please, Sign In to add comment