diff --git a/testtömegindex.sln b/testtömegindex.sln new file mode 100644 index 0000000..7450e23 --- /dev/null +++ b/testtömegindex.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testtömegindex", "testtömegindex\testtömegindex.csproj", "{3CC54EE7-5551-4076-9450-CEC04816CFDE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3CC54EE7-5551-4076-9450-CEC04816CFDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3CC54EE7-5551-4076-9450-CEC04816CFDE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3CC54EE7-5551-4076-9450-CEC04816CFDE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3CC54EE7-5551-4076-9450-CEC04816CFDE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {17E15A98-D53B-4E23-9374-FB65A5D60CC2} + EndGlobalSection +EndGlobal diff --git a/testtömegindex/App.config b/testtömegindex/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/testtömegindex/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/testtömegindex/Program.cs b/testtömegindex/Program.cs new file mode 100644 index 0000000..f15b1c8 --- /dev/null +++ b/testtömegindex/Program.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace testtömegindex +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Testtömeg-index számítás"); + Console.WriteLine(""); + Console.WriteLine("Magasság (cm): "); + double magassag = Convert.ToInt32(Console.ReadLine()); + Console.WriteLine("Tömeg(kg): "); + double tomeg = Convert.ToInt32(Console.ReadLine()); + magassag = magassag / 100; + double bmi; + bmi = tomeg / (magassag * magassag); + bmi = Math.Round(bmi * 100.0f) * 0.01; + Console.WriteLine("Az ön BMI-je = {0}", bmi); + if (bmi < 18) { + Console.WriteLine("Túlzottan sovány"); + } + else if (bmi >= 18 && bmi <= 25) { + Console.WriteLine("Ideális (egészséges) testsúlyú"); + } + else if (bmi > 25 && bmi <= 30) { + Console.WriteLine("Túlsúlyos"); + } + else if (bmi > 30) + { + Console.WriteLine("Túlzottan túlsúlyos"); + } + + Console.ReadKey(); + } + } +} diff --git a/testtömegindex/Properties/AssemblyInfo.cs b/testtömegindex/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0f14113 --- /dev/null +++ b/testtömegindex/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("testtömegindex")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("testtömegindex")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3cc54ee7-5551-4076-9450-cec04816cfde")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/testtömegindex/testtömegindex.csproj b/testtömegindex/testtömegindex.csproj new file mode 100644 index 0000000..244a2f5 --- /dev/null +++ b/testtömegindex/testtömegindex.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {3CC54EE7-5551-4076-9450-CEC04816CFDE} + Exe + testtömegindex + testtömegindex + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file