Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.39 KB | None | 0 0
  1. int n, i;
  2.             Console.WriteLine("Введите число n ");
  3.             n = Convert.ToInt32(Console.ReadLine());
  4.             i = 0;
  5.             while (i < n)
  6.             {
  7.                 i += 1;
  8.             }
  9.             //while (a < n)
  10.             //{
  11.             //    a *= 3;
  12.             //}
  13.             //Console.WriteLine("" + (a == n));
  14.  
  15.             //while (n % 3 == 0)
  16.             //{
  17.             //    n /= 3;
  18.             //}
  19.             //Console.WriteLine("" + (n == 1));
  20.  
  21.  
  22.  
  23.             //if (n == a)
  24.             //{
  25.             //    Console.WriteLine(" True ");
  26.             //}
  27.             //else
  28.             //{
  29.             //    Console.WriteLine(" False ");
  30.             //}
  31.  
  32.             //double a, b, sum, x;
  33.             //int n;
  34.             //n = 0;
  35.             //Console.WriteLine("Введите число a ");
  36.             //a = Convert.ToDouble(Console.ReadLine());
  37.             //Console.WriteLine("Введите число b ");
  38.             //b = Convert.ToDouble(Console.ReadLine());
  39.             //sum = 0;
  40.             //while (sum <= a)
  41.             //{
  42.             //    sum += b;
  43.             //    n += 1;
  44.             //}
  45.             //sum -= b;
  46.             //n -= 1;
  47.             //x = a - sum;
  48.             //Console.WriteLine(" кол-во отрезков b " + n);
  49.             //Console.WriteLine(" остаток в a " + x);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement