This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Uebungsblatt 2 | |
--Aufgabe 2 | |
{- Umdrehen aller Elemente der List | |
@param list - Liste die Umgedreht werden soll | |
@param n - Element der Liste das an Ausgabe angehaengt wird | |
-} | |
drehUm list | |
| length list == 0 = [] | |
| length list == 1 = list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-Aus einer Liste aus Listen eine einfache Liste machen-} | |
flatten::[[a]]->[a] | |
flatten [] = [] | |
flatten (x:xs) = x ++ flatten xs | |
{-Doppelte Elemente aus Liste loeschen-} | |
unique::(Eq a)=>[a]->[a] | |
unique [] = [] | |
unique [a] = [a] | |
unique (x:xs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-Aus einer Liste aus Listen eine einfache Liste machen-} | |
flatten::[[a]]->[a] | |
flatten [] = [] | |
flatten (x:xs) = x ++ flatten xs | |
{-Doppelte Elemente aus Liste loeschen-} | |
unique::(Eq a)=>[a]->[a] | |
unique [] = [] | |
unique [a] = [a] | |
unique (x:xs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Aufgabe 3 | |
{- Liste mit allen Natuerlichen Zahlen bilden die durch 3 oder 5 Teilbar sind | |
und alle Elemente aufsummieren -} | |
sumN:: Integer -> Integer | |
sumN n = sum[a| a <- [1..n], mod a 3==0 || mod a 5==0] | |
--Aufgabe 4 | |
{-Alle Elemente Aufsummieren und der Fibonacci Berechnung den hoechst Wert | |
uebergen, den sie berechnen soll-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='utf-8' ?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html lang='de' xml:lang='de' xmlns='http://www.w3.org/1999/xhtml'> | |
<head> | |
<title>helioband.de</title> | |
<link href="/stylesheets/helioband/layout.css?1271161445" media="screen" rel="stylesheet" type="text/css" /> | |
<script src="/javascripts/prototype.js?1271087201" type="text/javascript"></script> | |
<script src="/javascripts/effects.js?1271087201" type="text/javascript"></script> | |
<script src="/javascripts/dragdrop.js?1271087201" type="text/javascript"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= link_to_remote image_tag( "/images/helioband/design/music/music_1_10.png", :mouseover => "/images/helioband/design/music/music_1_10_1.png", :style => "padding: 0px; margin: 0px; border: 0px;"), { :url => track_url(3), :method => :get } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
int dateiOeffnen(char dateiname[],FILE* in) { | |
in = fopen(dateiname, "r"); // r steht für lesen | |
if (in == NULL) { | |
printf("Datei \"%s\" konnte nicht geoeffnet werden.\n",dateiname); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
int main (int argc, char* args[]) { | |
char beispiel[100]; | |
int i; | |
for(i = 0; i<99; ++i) { | |
beispiel[i] = 'a'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
int main (int argc, char* args[]) { | |
char str1[50] = "Ey haller,"; | |
char str2[20] = "was geht?"; | |
strcat(str1, str2); | |
printf("%s", str1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
int main (int argc, char* args[]) { | |
int i = 10; | |
char str1[60]; | |
sprintf(str1, "New%d.txt",i); |
OlderNewer