Будь умным!


У вас вопросы?
У нас ответы:) SamZan.net

Костромской Государственный технологический университет Кафедра информационных технологий

Работа добавлена на сайт samzan.net:


ФГБОУ ВПО «Костромской Государственный технологический университет»

Кафедра информационных технологий

Информатика

Лабораторные работы

Студентов 1-го курса

факультета АСТ группы 13-ЗИ-6

Невский Е.А.

Хренков Р.О.

Проверила Веселова Н.С.

Кострома -2013 г.

№1

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {  

int xa, ya, xb, yb, n1, n2;

           float x, y, k;

           Console.WriteLine("Введите координату Х точки А");

           xa = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите координату Y точки А");

           ya = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите координату Х точки B");

           xb = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите координату Y точки B");

           yb = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите n1");

           n1 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите n2");

           n2 = int.Parse(Console.ReadLine());

           k = (n1) / (n2);

           x = (xa + k * xb) / (1 + k);

           y = (ya + k * yb) / (1 + k);

           Console.WriteLine("ИСХОДНЫЕ ДАННЫЕ");

           Console.WriteLine("A=(" + xa + ", " + ya + "), B=(" + xb + ", " + yb + "), n1= " + n1 + " n2= " + n2);

           Console.WriteLine(" ---------------");

           Console.WriteLine("x= " + x + " y= " + y);

           Console.ReadLine();

       }

}

}

№2

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int X0, Y0, Z0, D1, D2, A, B, C;

           double d1,d2;

           Console.WriteLine("Введите X0");

           X0 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите Y0");

           Y0 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите Z0");

           Z0 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите D1");

           D1 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите D2");

           D2 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите A");

           A = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите B");

           B = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите C");

           C = int.Parse(Console.ReadLine());

           d1 = Math.Abs(A*X0+B*Y0+C*Z0+D1) / (Math.Sqrt(Math.Pow(A,2)+ Math.Pow(B,2)+Math.Pow(C,2)));

           d2 = Math.Abs(A*X0+B*Y0+C*Z0+D2) / (Math.Sqrt(Math.Pow(A,2)+ Math.Pow(B,2)+Math.Pow(C,2)));

           Console.WriteLine("ИСХОДНЫЕ ДАННЫЕ");

           Console.WriteLine("X0= " + X0);

           Console.WriteLine("Y0= " + Y0);

           Console.WriteLine("Z0= " + Z0);

           Console.WriteLine("D1= " + D1);

           Console.WriteLine("D2= " + D2);

           Console.WriteLine("A= " + A);

           Console.WriteLine("B= " + B);

           Console.WriteLine("C= " + C);

           Console.WriteLine("ОТВЕТ");

           Console.WriteLine("----------");

           Console.WriteLine("Расстояние до 1 плоскости = {0:f4} ", d1);

           Console.WriteLine("Расстояние до 2 плоскости = {0:f4} ", d2);

           Console.ReadLine();

       }

   }

}

№3

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int E,R,F,L,C;

           double I;

           Console.WriteLine("Введите R");

           R = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите L");

           L = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите C");

           C = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите E");

           E = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите F");

           F = int.Parse(Console.ReadLine());

           I = E / (Math.Sqrt(R * R + Math.Pow((2 * Math.PI * F * L - 1 / (2 * Math.PI * F * C)), 2)));

           Console.WriteLine("ИСХОДНЫЕ ДАННЫЕ");

           Console.WriteLine("R= " + R);

           Console.WriteLine("C= " + C);

           Console.WriteLine("F= " + F);

           Console.WriteLine("L= " + L);

           Console.WriteLine("E= " + E);

           Console.WriteLine("ОТВЕТ ЗАДАЧИ");

           Console.WriteLine("----------");

           Console.WriteLine("СИЛА ТОКА = {0:f4} ", I);

           Console.ReadLine();

       

       }

   }

}

№4

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int R, r, I, H;

           double S, V, s1, s2;

           Console.WriteLine("Введите R");

           R = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите r");

           r = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите I");

           I = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите H");

           H = int.Parse(Console.ReadLine());

           S=Math.PI*(R+r)*I+Math.PI*(R*R)+Math.PI*(r*r);

           V = (Math.PI*H*((R * R) + (r * r) + R * r)) / 3;

           s1=Math.PI*r*r;

           s2=Math.PI*R*R;

           Console.WriteLine("ИСХОДНЫЕ ДАННЫЕ");

           Console.WriteLine("R=" + R);

           Console.WriteLine("I=" + I);

           Console.WriteLine("r=" + r);

           Console.WriteLine("H=" + H);

           Console.WriteLine(" ---------------");

           Console.WriteLine("Промежуточные данные");

           Console.WriteLine("Площади оснований=" + s1+"," + s2);

           Console.WriteLine("Ответ");

           Console.WriteLine("S=" + S);

           Console.WriteLine("V=" + V);

           Console.ReadLine();

       }

   }

}

№5

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int S, c;

           double h1, h2, a;

           Console.WriteLine("Введите S");

           S = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите c");

           c = int.Parse(Console.ReadLine());

           h1=(-c-Math.Sqrt(Math.Pow(c,2)+100))/2;

           h2=(-c+Math.Sqrt(Math.Pow(c,2)+100))/2;

           a = h2 + c;

           Console.WriteLine("Моя задча решена");

           Console.WriteLine(" ---------------");

           Console.WriteLine("Высота="+h2);

           Console.WriteLine("Основание="+a) ;

           Console.WriteLine("S=" + S);

           Console.WriteLine("c=" + c);

           Console.ReadLine();

       }

   }

}

№6

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int a,b,c;

           double ma, mb, mc;

           Console.WriteLine("Введите a");

           a = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите c");

           c = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите b");

           b = int.Parse(Console.ReadLine());

           ma=0.5*Math.Sqrt(2*b*b+2*c*c-a*a);

           mb = 0.5 * Math.Sqrt(2 * a * a + 2 * c * c - b * b);

           mc=0.5 * Math.Sqrt(2 * b * b + 2 * a * a - c * c);

           Console.WriteLine("Моя задча решена");

           Console.WriteLine("СТОРОНЫ ТРЕУГОЛЬНИКА");

           Console.WriteLine("a="+a);

           Console.WriteLine("b="+b) ;

           Console.WriteLine("c=" + c);

           Console.WriteLine("МЕДИАНЫ ТРЕУГОЛЬНИКА");

           Console.WriteLine("ma=" + ma);

           Console.WriteLine("mb=" + mb);

           Console.WriteLine("mc=" + mc);

           Console.ReadLine();

       }

   }

}

Условные операторы. Вариант №2

№2

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int x, y;

           Console.WriteLine("Введите координату x");

           x = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите координату y");

           y = int.Parse(Console.ReadLine());

           if ((x > 0) && (y > 0)) Console.WriteLine("I");

           if ((x < 0) && (y > 0)) Console.WriteLine("II");

           if ((x < 0) && (y < 0)) Console.WriteLine("III");

           if ((x > 0) && (y < 0)) Console.WriteLine("IV");

           else ;

           Console.ReadLine();

       }

   }

}

№4

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int a,b,c,d;

           Console.WriteLine("Введите a");

           a = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите b");

           b = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите c");

           c = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите d");

           d = int.Parse(Console.ReadLine());

           if ((a > b) && (a > c) && (a > d)&&(a>b))Console.WriteLine("a");

           if((b>a)&&(b>c)&&(b>d))Console.WriteLine("b");

           if ((c > a) && (c > a) && (c > d))Console.WriteLine("c");

           if ((d > a) && (d > c) && (d > b)) Console.WriteLine("d");

           else ;

           Console.ReadLine();

       }

   }

}

№17

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int a, b, c, d;

           float a1, b1, c1, d1;

           Console.WriteLine("Введите a");

           a = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите b");

           b = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите c");

           c = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите d");

           d = int.Parse(Console.ReadLine());

           if (a < 0)

           {

               a1 = (Math.Abs(a * 2));

               Console.WriteLine("a="+a1);

           }

           if (b < 0)

           {

               b1 = (Math.Abs(b * 2));

               Console.WriteLine("b="+b1);

           }

               if (c < 0)

           {

               c1 = (Math.Abs(c * 2));

               Console.WriteLine("c="+c1);

           }

                   if (d < 0)

           {

               d1 = (Math.Abs(d * 2));

               Console.WriteLine("d="+d1);

           }

           else ;

           Console.ReadLine();

       }

   }

}

№22

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int a, b, c, d;

           double a1, b1, c1, d1;

           Console.WriteLine("Введите a");

           a = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите b");

           b = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите c");

           c = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите d");

           d = int.Parse(Console.ReadLine());

           a1 = a % 3;

           b1 = b % 3;

           c1 = c % 3;

           d1 = d % 3;

           if (a1 == 0)

               Console.WriteLine("a="+a1);

           if (b1 == 0)

               Console.WriteLine("b="+b1);

               if (c1 == 0)

               Console.WriteLine("c="+c1);

                   if (d1 == 0)

               Console.WriteLine("d="+d1);

           else ;

           Console.ReadLine();

       }

   }

}

Условные операторы. Вариант №8

№9

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int a, b, c, d;

           float a1, b1, c1, d1;

           Console.WriteLine("Введите a");

           a = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите b");

           b = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите c");

           c = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите d");

           d = int.Parse(Console.ReadLine());

           switch (a)

           {

               case 3:

               case 7:

                   {

                       Console.WriteLine("a=" + a);

                       break;

                   }

               default:

                   {

                       a1 = a = 0;

                       Console.WriteLine("a=" + a1);

                       break;

                   }

           }

           switch (b)

           {

               case 3:

               case 7:

                   {

                       Console.WriteLine("b=" + b);

                       break;

                   }

               default:

                   {

                       b1 = b = 0;

                       Console.WriteLine("b=" + b1);

                       break;

                   }

           }

           switch (c)

           {

               case 3:

               case 7:

                   {

                       Console.WriteLine("c=" + c);

                       break;

                   }

               default:

                   {

                       c1 = c = 0;

                       Console.WriteLine("c=" + c1);

                       break;

                   }

           }

           switch (d)

           {

               case 3:

               case 7:

                   {

                       Console.WriteLine("d=" + d);

                       break;

                   }

               default:

                   {

                       d1 = d = 0;

                       Console.WriteLine("d=" + d1);

                       break;

                   }

           }

           Console.ReadLine();

       }

   }

}

№14

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int x,x1,x2,x3,y1,y2,y3;

           float y;

           Console.WriteLine("Введите x");

           x = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите x1");

           x1 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите x2");

           x2 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите x3");

           x3 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите y1");

           y1 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите y2");

           y2 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите y3");

           y3 = int.Parse(Console.ReadLine());

           if ((x1 <= x) && (x <= x2))

           {

               y = y1 + ((x - x1) / (x2 - x1)) * (y2 - y1);

               Console.WriteLine("Y=" + y);

           }

               if ((x2 <= x) && (x <= x3))

           {

               y = y2 + ((x - x2) / (x3 - x2)) * (y3 - y2);

               Console.WriteLine("Y=" + y);

           }

           else ;

           Console.ReadLine();

       }

   }

}

№18

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int x1,x2,x3,x4,y1,y2,y3,y4;

           double d1, d2, d3, d4,d5,d6;

           Console.WriteLine("Введите A");

           x1 = int.Parse(Console.ReadLine());

           y1 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите B");

           x2 = int.Parse(Console.ReadLine());

           y2 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите C");

           x3 = int.Parse(Console.ReadLine());

           y3 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите D");

           x4 = int.Parse(Console.ReadLine());

           y4 = int.Parse(Console.ReadLine());

           d1 = Math.Sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));

           d2 = Math.Sqrt((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2));

           d3 = Math.Sqrt((x4 - x3) * (x4 - x3) + (y4 - y3) * (y4 - y3));

           d4 = Math.Sqrt((x1 - x4) * (x1 - x4) + (y1 - y4) * (y1 - y4));

           d5 = Math.Sqrt((x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3));

           d6 = Math.Sqrt((x4 - x2) * (x4 - x2) + (y4 - y2) * (y4 - y2));

           Console.WriteLine("d1=" + d1);

           Console.WriteLine("d2=" + d2);

           Console.WriteLine("d3=" + d3);

           Console.WriteLine("d4=" + d4);

           Console.WriteLine("d5=" + d5);

           Console.WriteLine("d6=" + d6);

           if ((d1==d2)&&(d2==d3))

             Console.WriteLine("Ромб");

           else

              if (d5 == d6)

               Console.WriteLine("Параллелограмм");

              else Console.WriteLine("4угольник");                                  

           Console.ReadLine();

       }

   }

}

№20

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int x1, x2, x3, x4, y1, y2, y3, y4;

           double d14, d24, d34;

           Console.WriteLine("Введите A");

           x1 = int.Parse(Console.ReadLine());

           y1 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите B");

           x2 = int.Parse(Console.ReadLine());

           y2 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите C");

           x3 = int.Parse(Console.ReadLine());

           y3 = int.Parse(Console.ReadLine());

           Console.WriteLine("Введите D");

           x4 = int.Parse(Console.ReadLine());

           y4 = int.Parse(Console.ReadLine());

           d14 = Math.Sqrt((x1 - x4) * (x1 - x4) + (y1 - y4) * (y1 - y4));

           d24 = Math.Sqrt((x2 - x4) * (x2 - x4) + (y2 - y4) * (y2 - y4));

           d34 = Math.Sqrt((x3 - x4) * (x3 - x4) + (y4 - y3) * (y4 - y3));

           Console.WriteLine("d14=(0:f3)", d14);

           Console.WriteLine("d24=(0:f3)", d24);

           Console.WriteLine("d34=(0:f3)", d34);

           if ((d14 <= d24) && (d24 <= d34))

               Console.WriteLine("d14 - минимальное");

           if ((d24 <= d34) && (d34 <= d14))

               Console.WriteLine("d24 - минимальное");

           if ((d34 <= d24) && (d24 <= d14))

               Console.WriteLine("d34 - минимальное");

           Console.ReadLine();

       }

   }

}

Циклы

№1

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           int x, i, n, k;

           double s;

           Console.WriteLine("x");

           x = int.Parse(Console.ReadLine());

           Console.WriteLine("n");

           n = int.Parse(Console.ReadLine());

           s = 0;

           k = 1;

           for (i = 1; i <= n; i++)

           {

               k = k * n;

               s = s + Math.Pow(x, n)/(k);

           }

           Console.WriteLine(s);

           Console.ReadLine();

       }

   }

}

№2

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

   class Program

   {

       static void Main(string[] args)

       {

           double s, k, x, a, d, g, h, y, r, u, w, n;

           s = 10;

           k = 0.1;

           x = s + s * k;

           a = x + x * k;

           d = a + a * k;

           g = d + d * k;

           h = g + g * k;

           y = h + h * k;

           r = y + y * k;

           u = r + r * k;

           w = u + u * k;

           n = x + a + d + g + h + y + r;

           Console.WriteLine("2 день" + x);

           Console.WriteLine("3 день" + a);

           Console.WriteLine("4 день" + d);

           Console.WriteLine("5 день" + g);

           Console.WriteLine("6 день" + h);

           Console.WriteLine("7 день" + y);

           Console.WriteLine("8 день" + r);

           Console.WriteLine("9 день" + u);

           Console.WriteLine("10 день" + w);

           Console.WriteLine("Сумма" + n);

           Console.ReadLine();

       }

   }

}

№3

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace algoritmEvklida

{

   class Program

   {

       static void Main(string[] args)

       {

           string z, x;

           int z1, x1, i;

           i = 0;

           Console.WriteLine("Введите 1е целое число");

           z = Console.ReadLine();

           int.TryParse(z, out z1);

           Console.WriteLine("Введите 2е целое число");

           x = Console.ReadLine();

           int.TryParse(x, out x1);

       tipacikl:

           i = ++i;

           if (z1 == x1)     

           {

               Console.WriteLine("Наибольший делитель " + z1 + ". Цикл выполнился целых " + i + " раз.");

           }

           else

           {

               if (z1 > x1)

               {

                   z1 = z1 % x1;

                   if (z1 == 0)

                       Console.WriteLine("Наибольший делитель " + x1 + ". Цикл выполнился целых " + i + " раз.");

                   else

                       goto tipacikl;

               }

               else

               {

                   x1 = x1 % z1;

                   if (x1 == 0)

                       Console.WriteLine("Наибольший делитель " + z1 + ". Цикл выполнился целых " + i + " раз.");

                   else

                       goto tipacikl;

                   Console.ReadLine();

               }

               }

           Console.ReadLine();

           }

       }

   }

№4

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication4

{

   class Program

   {

       static void Main(string[] args)

       {

           int z,b,c;

           Console.WriteLine("Введите число n");

           a = int.Parse(Console.ReadLine());

           b=a;

           c = 0;

           while ((a > 9) && (c == 0))

           {

               if ((a % 10) < ((a % 100) / 10))

                   c = 1;

               a = a / 10;

           }

           if (c == 0)

               Console.WriteLine("Последовательность цифр числа {0} при просомтре их слева на право возрастающая",x);

           else Console.WriteLine("Последовательность цифр числа {0} при просмотре их слева на право не возрастающая", x);

           Console.ReadLine();

       }

   }

}

№5

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication4

{

   class Program

   {

       static void Main(string[] args)

       {

           int z,x,c,a,i,d;

           Console.WriteLine("Введите число n");

           z = int.Parse(Console.ReadLine());

           x = z;

           a = 1;

           c = z%10;

           z = z / 10;

           while (z!=0)

           {

               if (z%10>c)

                   c = z%10;

               z = z / 10;

               a++;

           }

           z=x;

           d=0;

           for (i = 1; i <= a; i++)

           {

               if (z % 10 == c)

                   d++;

               z = z / 10;

           }

           Console.WriteLine("Максимальная цифра {0} встречается в числе {1} {2} раз",c,x,d);

           Console.ReadLine();

       }

   }

}

№6

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication4

{

   class Program

   {

       static void Main(string[] args)

       {

           double z,y;

           for (z = -3; z < 1.1; z = z + 0.1)

           {

               y = 4 * z * z * z - 2 * z * z + 5;

               Console.WriteLine("При х={0:f1} у={1:f2}", z, y);

           }

           Console.ReadLine();

       }

   }

}

№7

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication4

{

   class Program

   {

       static void Main(string[] args)

       {

           int z,x,v,w;

           string q;

           Console.WriteLine("Введите число для перевода");

           z = int.Parse(Console.ReadLine());

           x = z;

           v=0;

           q="1";

           while (x > 0)

           {

               if (x % 2 == 0)

                   q = q + "0";

               else

                   q = q + "1";

               x=x/2;

           }

           v = int.Parse(q);

           w = 0;

           Console.Write("Число {0} в двоичной системе счисления имеет вид ", z);

           while (v>1)

           {

               w = v % 10;

               Console.Write(w);

               v = v / 10;

           }

           Console.WriteLine();

           Console.ReadLine();

       }

   }

}

№8

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication4

{

   class Program

   {

       static void Main(string[] args)

       {

           int z,x,v,w;

           string q,a;

           x=1;

           v=0;

           z = 1;

           q="Введены числа ";

           while (z != 0)

           {

               Console.WriteLine("Введите число");

               a = Console.ReadLine();

               z = int.Parse(a);

               q = q + a + " ";

               v = v + z;

               w = v / x;

               x++;

               Console.WriteLine(q + "их среднееарифметическое равно {0}", w);

           }

           Console.ReadLine();

           

       }

   }

}




1. Нефть России 34 1996 г
2. Башкирский государственный педагогический университет им
3. Хождение Богородицы по мукам КиевоПечерский патерик Она имела рукописный характер так как в то врем
4. Философия эпохи Возрождения
5. тематический анализ 3 семестр Числовые ряды- основные понятия
6. ПРАГМАТИКА Об~єкт предмет завдання прагматики
7. Новочеркасск 2008 Критерии оценивания Оценивание есть определение качества достигнутых школьнико
8. Поняття про текст
9. Автоматизация процесса подготовки шихты
10. Теория проектированияРеконструкция помещений жилого фонда с переоборудованием их по другому назначению.html
11. это особый вид деятельности специфический характер который связан с выполнением управленческих действий
12. Абсцесс мягких тканей
13. сотрудничал упомянуты в тексте излишне называть их имена здесь; однако я хочу официально принести им свою
14. Розробка комплексної програми стимулювання збуту Програма стимулювання збуту яка розробляється на під
15. Персонал. УПОЛНОМОЧЕННОЕ ЛИЦО.
16. всасывать впитывать; абсорбировать; поглощатьto bsorb het поглощать теплоCertin chemicls re esily bsorbed into the bloodstrem while others
17. Рычажный механизм и зубчатая передача
18. Я и не Я центральная проблема философии Фихте.html
19. Семья Кюри
20. угнетаемыми Страны с высокими значениями дистанции власти- Россия арабские страны Индия и Китай