Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Uwe Wienkop
Prog1_WS2017_18_Wienkop
Commits
add19e83
Commit
add19e83
authored
Oct 16, 2017
by
Uwe Wienkop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Schleifen und Primzahlen
parent
e0c61558
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
310 additions
and
0 deletions
+310
-0
Prog1_WS2017-18/02Primzahlen/02Primzahlen.csproj
Prog1_WS2017-18/02Primzahlen/02Primzahlen.csproj
+60
-0
Prog1_WS2017-18/02Primzahlen/App.config
Prog1_WS2017-18/02Primzahlen/App.config
+6
-0
Prog1_WS2017-18/02Primzahlen/Program.cs
Prog1_WS2017-18/02Primzahlen/Program.cs
+34
-0
Prog1_WS2017-18/02Primzahlen/Properties/AssemblyInfo.cs
Prog1_WS2017-18/02Primzahlen/Properties/AssemblyInfo.cs
+36
-0
Prog1_WS2017-18/02Schleifen/02Schleifen.csproj
Prog1_WS2017-18/02Schleifen/02Schleifen.csproj
+60
-0
Prog1_WS2017-18/02Schleifen/App.config
Prog1_WS2017-18/02Schleifen/App.config
+6
-0
Prog1_WS2017-18/02Schleifen/Program.cs
Prog1_WS2017-18/02Schleifen/Program.cs
+32
-0
Prog1_WS2017-18/02Schleifen/Properties/AssemblyInfo.cs
Prog1_WS2017-18/02Schleifen/Properties/AssemblyInfo.cs
+36
-0
Prog1_WS2017-18/Index.html
Prog1_WS2017-18/Index.html
+23
-0
Prog1_WS2017-18/Prog1_WS2017-18.sln
Prog1_WS2017-18/Prog1_WS2017-18.sln
+17
-0
No files found.
Prog1_WS2017-18/02Primzahlen/02Primzahlen.csproj
0 → 100644
View file @
add19e83
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProjectGuid>
{6BA9A56B-CB21-4640-BC94-E4A4520E8781}
</ProjectGuid>
<OutputType>
Exe
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
_02Primzahlen
</RootNamespace>
<AssemblyName>
02Primzahlen
</AssemblyName>
<TargetFrameworkVersion>
v4.5.2
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<AutoGenerateBindingRedirects>
true
</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug\
</OutputPath>
<DefineConstants>
DEBUG;TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release\
</OutputPath>
<DefineConstants>
TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Xml.Linq"
/>
<Reference
Include=
"System.Data.DataSetExtensions"
/>
<Reference
Include=
"Microsoft.CSharp"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Net.Http"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
</ItemGroup>
<ItemGroup>
<None
Include=
"App.config"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
Prog1_WS2017-18/02Primzahlen/App.config
0 → 100644
View file @
add19e83
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.5.2"
/>
</
startup
>
</
configuration
>
\ No newline at end of file
Prog1_WS2017-18/02Primzahlen/Program.cs
0 → 100644
View file @
add19e83
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
_02Primzahlen
{
class
Program
{
static
void
Main
(
string
[]
args
)
{
int
zahl
=
997
;
Console
.
WriteLine
(
"Teilertest beginnt"
);
bool
istPrimzahl
=
true
;
for
(
int
teiler
=
2
;
teiler
<
zahl
;
teiler
++)
{
if
(
zahl
%
teiler
==
0
)
// zahl ist durch den teiler teilbar
{
Console
.
WriteLine
(
$"
{
zahl
}
ist durch
{
teiler
}
teilbar"
);
istPrimzahl
=
false
;
break
;
}
}
Console
.
WriteLine
(
"Teilertest beendet"
);
if
(
istPrimzahl
==
true
)
Console
.
WriteLine
(
$"
{
zahl
}
ist eine Primzahl"
);
else
Console
.
WriteLine
(
$"
{
zahl
}
ist KEINE Primzahl"
);
}
}
}
Prog1_WS2017-18/02Primzahlen/Properties/AssemblyInfo.cs
0 → 100644
View file @
add19e83
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
(
"02Primzahlen"
)]
[
assembly
:
AssemblyDescription
(
""
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
[
assembly
:
AssemblyCompany
(
""
)]
[
assembly
:
AssemblyProduct
(
"02Primzahlen"
)]
[
assembly
:
AssemblyCopyright
(
"Copyright © 2017"
)]
[
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
(
"6ba9a56b-cb21-4640-bc94-e4a4520e8781"
)]
// 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"
)]
Prog1_WS2017-18/02Schleifen/02Schleifen.csproj
0 → 100644
View file @
add19e83
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProjectGuid>
{265025DE-968E-47CD-867D-61AB096C60AC}
</ProjectGuid>
<OutputType>
Exe
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
_02Schleifen
</RootNamespace>
<AssemblyName>
02Schleifen
</AssemblyName>
<TargetFrameworkVersion>
v4.5.2
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<AutoGenerateBindingRedirects>
true
</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug\
</OutputPath>
<DefineConstants>
DEBUG;TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release\
</OutputPath>
<DefineConstants>
TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Xml.Linq"
/>
<Reference
Include=
"System.Data.DataSetExtensions"
/>
<Reference
Include=
"Microsoft.CSharp"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Net.Http"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
</ItemGroup>
<ItemGroup>
<None
Include=
"App.config"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
Prog1_WS2017-18/02Schleifen/App.config
0 → 100644
View file @
add19e83
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.5.2"
/>
</
startup
>
</
configuration
>
\ No newline at end of file
Prog1_WS2017-18/02Schleifen/Program.cs
0 → 100644
View file @
add19e83
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
_02Schleifen
{
class
Program
{
static
void
Main
(
string
[]
args
)
{
// int i = 0; -- int: Der Datentyp der Schleifenvariable
// -- i=0: Startwert ist 0
// i < 15 -- Durchlaufbedingung, hier: Ist i < 15?
// -- Die Durchlaufbedingung wird VOR jedem Schleifendurchlauf,
// auch vor dem ersten Durchlauf, getestet
// i++ / i = i+1 -- Erhöht die Schleifenvariable NACH JEDEM Durchlauf
for
(
int
i
=
1
;
i
<=
15
;
i
++)
{
Console
.
WriteLine
(
$"Wert der Schleifenvariable:
{
i
}
"
);
}
int
j
;
for
(
j
=
0
;
j
<
1000000000
;
j
++)
;
Console
.
WriteLine
(
"_________________________"
);
Console
.
Write
(
$"
{
j
}
"
);
Console
.
WriteLine
(
j
);
}
}
}
Prog1_WS2017-18/02Schleifen/Properties/AssemblyInfo.cs
0 → 100644
View file @
add19e83
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
(
"02Schleifen"
)]
[
assembly
:
AssemblyDescription
(
""
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
[
assembly
:
AssemblyCompany
(
""
)]
[
assembly
:
AssemblyProduct
(
"02Schleifen"
)]
[
assembly
:
AssemblyCopyright
(
"Copyright © 2017"
)]
[
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
(
"265025de-968e-47cd-867d-61ab096c60ac"
)]
// 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"
)]
Prog1_WS2017-18/Index.html
0 → 100644
View file @
add19e83
<!DOCTYPE html>
<html
lang=
"en"
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
</head>
<body>
<h1>
1. Woche
</h1>
<ul>
<li>
Ausgabe mit Console.WriteLine()
</li>
<li>
Tastaturabfrage mit Console.ReadLine()
</li>
<li>
Anlegen von double- und string-Variablen
</li>
<li>
Konvertierung einer Tastatureingabe/String in einen double-Wert
</li>
<li>
Numerische Berechnung (Pythagoras)
</li>
<li>
Anweisungen und Anweisungsblöcke { }
</li>
<li>
Fallunterscheidung mit if (Bedingung) {Anweisungen-dann} else {Anweisungen-sonst}
</li>
<li>
Mehrfachfallunterscheidung zur Bestimmung der Position in einem Intervall
</li>
</ul>
<h1>
2. Woche
</h1>
<ul></ul>
</body>
</html>
\ No newline at end of file
Prog1_WS2017-18/Prog1_WS2017-18.sln
View file @
add19e83
...
...
@@ -7,6 +7,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "01Pythagoras", "01Pythagora
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "01If-Fallunterscheidungen", "01If-Fallunterscheidungen\01If-Fallunterscheidungen.csproj", "{BEEE66CF-33BE-44CC-8B6C-DE8F956857B3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DD66E463-4183-46B2-A475-A587C445E359}"
ProjectSection(SolutionItems) = preProject
Index.html = Index.html
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "02Schleifen", "02Schleifen\02Schleifen.csproj", "{265025DE-968E-47CD-867D-61AB096C60AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "02Primzahlen", "02Primzahlen\02Primzahlen.csproj", "{6BA9A56B-CB21-4640-BC94-E4A4520E8781}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
...
...
@@ -21,6 +30,14 @@ Global
{BEEE66CF-33BE-44CC-8B6C-DE8F956857B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BEEE66CF-33BE-44CC-8B6C-DE8F956857B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEEE66CF-33BE-44CC-8B6C-DE8F956857B3}.Release|Any CPU.Build.0 = Release|Any CPU
{265025DE-968E-47CD-867D-61AB096C60AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{265025DE-968E-47CD-867D-61AB096C60AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{265025DE-968E-47CD-867D-61AB096C60AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{265025DE-968E-47CD-867D-61AB096C60AC}.Release|Any CPU.Build.0 = Release|Any CPU
{6BA9A56B-CB21-4640-BC94-E4A4520E8781}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BA9A56B-CB21-4640-BC94-E4A4520E8781}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BA9A56B-CB21-4640-BC94-E4A4520E8781}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BA9A56B-CB21-4640-BC94-E4A4520E8781}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment