Forráskód Böngészése

Расчет зарплаты исправленный

Sultan Khasanov 2 éve
szülő
commit
0f3e3b77b5

BIN
.vs/Laba 4/FileContentIndex/3cde4494-bea6-4789-9fbc-9287eab22dbf.vsidx


BIN
.vs/Laba 4/FileContentIndex/4a842912-da78-481b-b113-df47577c765a.vsidx


BIN
.vs/Laba 4/FileContentIndex/4da3f5d9-7711-4299-9963-2be4b9ee149c.vsidx


BIN
.vs/Laba 4/FileContentIndex/7b86196c-dc9f-4a6f-8c17-2675201716ab.vsidx


BIN
.vs/Laba 4/v17/.suo


+ 0 - 155
Laba 4/.cs

@@ -1,155 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-internal static class ProgramHelpers
-{
-    static void Main(string[] args)
-    {
-        //ПРИВЕТ
-        double x, y; //Ввод переменных в программу
-        Console.Write("Введите x: ");//Действие для пользователя
-        x = double.Parse(Console.ReadLine());//Ввод вещественной переменной преобразованной из строки
-        y = 4 * (Math.Pow(x - 3, 6)) - 7 * (Math.Pow(x - 3, 3)) + 2;//Нахождение значения функции
-        Console.WriteLine("Значение функции = {0}", y);//Вывод значения y
-                                                       // некотор214ые ифывзменения кода
-                                                       // некотофыврые изменения кода
-                                                       // некотфвфвыорые измеasнения кода
-                                                       // некоторые asdasddssadизменasdения кода
-                                                       // некотофыврые изменения кодаыфsadadadas
-                                                       // некоторфвые изменения кода
-                                                       // некотофывasdрые изменения кода
-                                                       //Добавили инструкцию
-                                                       // git commit –m “реализовали возможность определить совершеннолетие пользователя”
-                                                       // git commit –m “реализовали возможность определить asdыфвфсовершеннолетие пользователя”
-
-        //Проверка правильности номера телефона
-        Console.WriteLine("Введите номер телефона:");
-
-        string mobileOperator = Console.ReadLine();
-        mobileOperator = mobileOperator.Insert(1, "(");
-        mobileOperator = mobileOperator.Insert(5, ")");
-        mobileOperator = mobileOperator.Insert(9, "-");
-        mobileOperator = mobileOperator.Insert(12, "-");
-        Console.WriteLine(mobileOperator);
-
-        List<int> numbersOperator = new List<int>();
-        numbersOperator.Add(029);
-        numbersOperator.Add(044);
-        numbersOperator.Add(033);
-        numbersOperator.Add(025);
-
-        var startindex = mobileOperator.IndexOf("(") + 1;
-        var endIndex = mobileOperator.IndexOf(")", startindex);
-        var mob = mobileOperator.Substring(startindex, endIndex - startindex);
-        int resulte = Convert.ToInt32(mob);
-        var mobiletelephone = mobileOperator.Remove(0, 6);
-        bool correctOperator = numbersOperator.Contains(resulte);
-
-        if (correctOperator == false)
-        {
-            Console.WriteLine("Введен не правильный номер оператора");
-            Console.ReadLine();
-        }
-        else
-        {
-            var split = mobiletelephone.Split(new Char[] { '-' });
-            for (int f = 0; f < split.Length; f++)
-            {
-                if (split[0].Length != 3)
-                {
-                    Console.WriteLine("Введен не правильный номер телефона");
-                    Console.ReadLine();
-                    break;
-                }
-                if (split[1].Length != 2)
-                {
-                    Console.WriteLine("Введен не правильный номер телефона");
-                    Console.ReadLine();
-                    break;
-                }
-                if (split[2].Length != 2)
-                {
-
-                    Console.WriteLine("Введен не правильный номер телефона");
-                    Console.ReadLine();
-                    break;
-                }
-                Console.WriteLine("Номер телефона и оператора введен корректно");
-                Console.ReadLine();
-            }
-        }
-
-        //Расчет прибыли
-        int a, b, c;
-        a = 0;
-        b = 0;
-        c = a - b;
-
-        Console.WriteLine("dochod:", a);
-        Console.ReadLine();
-
-        Console.WriteLine("raschody:", b);
-        Console.ReadLine();
-
-        if (c > 0)
-        {
-            Console.WriteLine("dochod jest");
-        }
-        else
-        {
-
-            Console.WriteLine("ubytok ");
-        }
-
-
-        //Расчет идеального веса
-
-
-        double rost, ves, index, pol, voz, zap, lor, kup;
-        {
-            Console.WriteLine("Введите свой рост:");
-            rost = double.Parse(Console.ReadLine());
-            Console.WriteLine("Введите свой вес:");
-            ves = double.Parse(Console.ReadLine());
-            Console.WriteLine("Введите свой пол (м=0 или ж=1):");
-            pol = double.Parse(Console.ReadLine());
-            Console.WriteLine("Введите свой возраст:");
-            voz = double.Parse(Console.ReadLine());
-            Console.WriteLine("Введите обхват запястья:");
-            zap = double.Parse(Console.ReadLine());
-
-            ///кетле
-
-            rost = rost / 100;
-            index = ves / (rost * rost);
-            if (index <= 18.5)
-                Console.WriteLine("У Вас дефицит массы тела! Идите жрать, пожалуйста!!!");
-            if (index >= 18.5 && index <= 24.9)
-                Console.WriteLine("Поздравляю, Ваш жирок не привышает нормы)))");
-            if (index >= 25.0 && index <= 29.9)
-                Console.WriteLine("У Вас избыточная масса тела! Пора бы на пробежку :/");
-            if (index >= 30.0 && index <= 34.9)
-                Console.WriteLine("У Вас ожирение 1-й степени! Садитесь ка на диету!!!");
-            if (index >= 35.0 && index <= 39.9)
-                Console.WriteLine("У Вас ожирение 2-й степени! Срочно в качалочку!!!");
-            if (index == 40 || index >= 40)
-                Console.WriteLine("У Вас 3-я степень ожирения! Срочно к диетологу, тут Вам только он поможет!!!");
-            rost = rost * 100;
-            if (pol == 1)
-            {
-                lor = rost - 100 - ((rost - 150) / 4);
-                Console.WriteLine("Ваш идеальный вес по формуле Лоренца:" + lor.ToString("0"));
-                kup = (rost * 0.624 - 0.453);
-                Console.WriteLine("Ваш идеальный вес по формуле Купера:" + kup.ToString("0"));
-            }
-
-            if (pol == 1)
-            {
-                lor = rost - 100 - ((rost - 150) / 2);
-                Console.WriteLine("Ваш идеальный вес по формуле Лоренца:" + lor.ToString("0"));
-                kup = (0.713 * rost - 58.03);
-                Console.WriteLine("Ваш идеальный вес по формуле Купера:" + kup.ToString("0"));
-            }
-        }
-    }
-}

+ 0 - 1
Laba 4/Laba 4.csproj

@@ -45,7 +45,6 @@
   <ItemGroup>
     <Compile Include="Program.cs" />
     <Compile Include=".cs" />
-    <Compile Include="ProgramHelpers.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
   <ItemGroup>

+ 11 - 0
Laba 4/Program.cs

@@ -163,6 +163,17 @@ namespace laba4
 
 
             //изменение 4
+
+            //Расчет зарплаты
+            Console.Write("Input FZP: ");
+            double FZP = Convert.ToDouble(Console.ReadLine());
+            Console.Write("Input Nsotr: ");
+            int Nsotr = Convert.ToInt32(Console.ReadLine());
+            double SocN = FZP / 100 * 26.2,
+                   OKLAD = (FZP - SocN) / Nsotr,
+                   PN = OKLAD / 100 * 13,
+                   Salary = OKLAD - PN;
+            Console.WriteLine("Salary is {0}", Salary);
         }
     }
 }

+ 0 - 3
Laba 4/ProgramHelpers.cs

@@ -1,3 +0,0 @@
-static class ProgramHelpers
-{
-}

+ 1 - 1
Laba 4/obj/Debug/Laba 4.csproj.CoreCompileInputs.cache

@@ -1 +1 @@
-65774098bde3eebc163ef11f33dad3238a845c83
+72d9db49f67479dead1464a0462f8be738338f9d