Skip to content
Snippets Groups Projects
Commit 41e0ede9 authored by Vesa Lappalainen's avatar Vesa Lappalainen :bicyclist:
Browse files

live08 alku

parent c46d871e
No related branches found
No related tags found
No related merge requests found
using System;
public class Laskuja
{
public static void Main()
......@@ -9,6 +11,18 @@ public class Laskuja
System.Console.WriteLine(c);
}
public static double KuutionTilavuus(double s)
{
double tulos = s * s * s;
return tulos;
}
public static double FahrenheitToCelsius(double tempF)
{
double tulos = (tempF - 32) / (9.0 / 5);
return tulos;
}
/// <summary>
/// Funktio laskeea lukujen a ja b erotuksen
......
using System;
using NUnit.Framework;
using static Laskuja;
......@@ -6,12 +7,12 @@ using static Laskuja;
public class TestLaskuja
{
[Test]
public void TestVahenna20()
public void TestVahenna34()
{
Assert.AreEqual( 0, Vahenna(0, 0) , "in method Vahenna, line 21");
Assert.AreEqual( 3, Vahenna(5, 2) , "in method Vahenna, line 22");
Assert.AreEqual( -3, Vahenna(2, 5) , "in method Vahenna, line 23");
Assert.AreEqual( 6, Vahenna(4, -2) , "in method Vahenna, line 24");
Assert.AreEqual( 0, Vahenna(0, 0) , "in method Vahenna, line 35");
Assert.AreEqual( 3, Vahenna(5, 2) , "in method Vahenna, line 36");
Assert.AreEqual( -3, Vahenna(2, 5) , "in method Vahenna, line 37");
Assert.AreEqual( 6, Vahenna(4, -2) , "in method Vahenna, line 38");
}
}
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/projectSettingsUpdater.xml
/.idea.live08.iml
/modules.xml
/contentModel.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>
\ No newline at end of file
using System;
using System.Text;
using System.Linq;
using System.Collections.Generic;
/// @author Omanimi
/// @version 26.09.2023
/// <summary>
///
/// </summary>
public class Kolmioita
{
/// <summary>
///
/// </summary>
public static void Main()
{
}
}
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ExternalConsole>true</ExternalConsole>
</PropertyGroup>
</Project>

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "kolmioita", "kolmioita\kolmioita.csproj", "{A9EC7CDA-B819-459D-90AE-FA364AAE1010}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A9EC7CDA-B819-459D-90AE-FA364AAE1010}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9EC7CDA-B819-459D-90AE-FA364AAE1010}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9EC7CDA-B819-459D-90AE-FA364AAE1010}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9EC7CDA-B819-459D-90AE-FA364AAE1010}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment