Sephinroth

prac 3 ex 4

Sep 21st, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace prac_3_ex_1
  7. {
  8.     class Program
  9.     {
  10.        
  11.         static void Main(string[] args)
  12.         {
  13.             Console.Write("Введите A: ");
  14.             int a = int.Parse(Console.ReadLine());
  15.             Console.Write("Введите B: ");
  16.             int b = int.Parse(Console.ReadLine());
  17.             for (int i = b; i >= a; i--)
  18.                 if (i % 2 != 0) Console.Write("{0} ", Math.Pow(i, 3));
  19.             Console.ReadKey();
  20.  
  21.         }
  22.     }
  23. }
Add Comment
Please, Sign In to add comment