diff --git a/ConsoleApp111/ConsoleApp1/ConsoleApp1.csproj b/ConsoleApp111/ConsoleApp1/ConsoleApp1.csproj new file mode 100644 index 0000000..c73e0d1 --- /dev/null +++ b/ConsoleApp111/ConsoleApp1/ConsoleApp1.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + diff --git a/ConsoleApp111/ConsoleApp1/Program.cs b/ConsoleApp111/ConsoleApp1/Program.cs new file mode 100644 index 0000000..ee2f1b6 --- /dev/null +++ b/ConsoleApp111/ConsoleApp1/Program.cs @@ -0,0 +1,53 @@ +using System; +namespace ConsoleApp1 +{ + class Program + { + static void Main(string[] args) + { + int t=0; + string s; + Console.WriteLine("Введите возраст"); + s = Console.ReadLine(); + int n = Convert.ToInt32(s); + if ((n >= 0) && (n < 7)) + { + Console.WriteLine("Дошкольник"); + t = 1; + } + if ((n >= 8) && (n < 18)) + { + Console.WriteLine("Школьник"); + t = 2; + } + if (n >= 19 && n < 23) + { + Console.WriteLine("Студент"); + t = 3; + } + if (n >= 24 && n < 64) + { + Console.WriteLine("Работяга"); + t = 4; + } + if (n >= 65 && n < 100) + { + Console.WriteLine("Дед"); + t = 5; + } + + Console.WriteLine("Льготные поездки в общевственном транспорте выдают только дошкольникам и дедам."); + Console.WriteLine("Доступ к льготным поездкам:"); + if (t == 1 || t == 5) + { + Console.WriteLine("Есть"); + } + else + { + Console.WriteLine("Нет"); + } + Console.ReadKey(); + } + } + + } diff --git a/ConsoleApp111/ConsoleApp111.sln b/ConsoleApp111/ConsoleApp111.sln new file mode 100644 index 0000000..4851c8a --- /dev/null +++ b/ConsoleApp111/ConsoleApp111.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{A40AF485-BE53-4641-8759-EF3A3786014F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A40AF485-BE53-4641-8759-EF3A3786014F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A40AF485-BE53-4641-8759-EF3A3786014F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A40AF485-BE53-4641-8759-EF3A3786014F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A40AF485-BE53-4641-8759-EF3A3786014F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {966DA2F6-03F1-4463-9A40-BCD1417C1381} + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md index f61d7f1..36d6af2 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ -# exam_42_2020 \ No newline at end of file + , , 0 7 .... . . + \ No newline at end of file diff --git a/gitignore b/gitignore new file mode 100644 index 0000000..35d4ccd --- /dev/null +++ b/gitignore @@ -0,0 +1,206 @@ +# Download this file using PowerShell v3 under Windows with the following comand: +# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore +# or wget: +# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# OS generated files # +.DS_Store* +Icon? + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +*.Cache +ClientBin/ +# [Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings +modulesbin/ +tempbin/ + +# EPiServer Site file (VPP) +AppData/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# vim +*.txt~ +*.swp +*.swo + +# svn +.svn + +# Remainings from resolvings conflicts in Source Control +*.orig + +# SQL Server files +**/App_Data/*.mdf +**/App_Data/*.ldf +**/App_Data/*.sdf + + +#LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +# SASS Compiler cache +.sass-cache + +# Visual Studio 2014 CTP +**/*.sln.ide + +# Visual Studio temp something +.vs/ + +# VS 2015+ +*.vc.vc.opendb +*.vc.db + +# Rider +.idea/ + +**/node_modules/* + +# Added by Jskonst +.vscode/ +Properties/ + +##### +# End of core ignore list, below put you custom 'per project' settings (patterns or path) +##### \ No newline at end of file diff --git a/using System;.cs b/using System;.cs new file mode 100644 index 0000000..1e8bbe5 --- /dev/null +++ b/using System;.cs @@ -0,0 +1,42 @@ +using System; +namespace ConsoleApp1 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Введите возраст"); + int n = Console.Read(); + if (n >= 0 && n <= 7) + { + Console.WriteLine("Дошкольник"); + Console.ReadKey(); + } + else if (n >= 8 && n <= 18) + { + Console.WriteLine("Школьник"); + Console.ReadKey(); + } + else if (n >= 19 && n <= 23) + { + Console.WriteLine("Студент"); + Console.ReadKey(); + } + else if (n >= 24 && n <= 65) + { + Console.WriteLine("Работяга"); + Console.ReadKey(); + } + else if (n >= 65 && n <= 100) + { + Console.WriteLine("Дед инсайд"); + Console.ReadKey(); + } + else if (n >= 100 && n <= 120) + { + Console.WriteLine("Жмых"); + Console.ReadKey(); + } + } + } +} \ No newline at end of file