You are not logged in.


Äd-l

Stamm Clubber

  • "Äd-l" started this thread

Posts: 93

Location: asdf

Occupation: asdf

  • Send private message

1

Tuesday, September 12th 2006, 9:51pm

Rechnen mit Dos (batch datei)

kann man im dos rechnen zb. eine beliebige zahl mit einer anderen zahl multiplitzieren und die batch datei gibt die lösung aus ?
;( Beim Programieren kann man viel zerstören aber man kann auch viel erschafen :D

VB-freak

Power Clubber

Posts: 507

Location: NRW

Occupation: Informatikstudent

  • Send private message

2

Tuesday, September 12th 2006, 10:34pm

Nabend!

Wenn du ein entsprechendes Programm hast (also nen Rechner) dann wird das mit Sicherheit gehen. Aber ohne Programm denke ich nicht, man muss schon ne Konsolenanwendung (in Java, C, C++, ...) schreiben.

vb-freak
Linux is like a wigwam - no windows, no gates, apache inside!

Äd-l

Stamm Clubber

  • "Äd-l" started this thread

Posts: 93

Location: asdf

Occupation: asdf

  • Send private message

3

Tuesday, September 12th 2006, 10:37pm

also könte ich nicht so was machn:

echo.
echo rechen progi
echo.
%random% + %random% = resultat

?(
;( Beim Programieren kann man viel zerstören aber man kann auch viel erschafen :D

Jockel

Ehrenmitglied mit Auszeichnung

Posts: 3,337

Location: (7<<0xd|0xb<<6|3<<4)+1

Occupation: Wissenschaftlicher Mitarbeiter

  • Send private message

4

Wednesday, September 13th 2006, 8:08am

Hallo!

set a=2
set b=3

set /a c=%a% + %b%

=> %c% == 5

mfg

Jockel

PS: Und ich als Unix-Mensch poste dies hier - wo sind denn unsere Windows Gurus???
--------
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: As potential programmers they are mentally mutilated beyond hope of regeneration. [Edsgar W. Dijkstra, 1975]

exnase

Active Clubbers

Posts: 696

Location: STD

Occupation: Nicht mehr Student

  • Send private message

5

Wednesday, September 13th 2006, 9:40am

Im Bett mit Zahnschmerzen :(

mfg exnase
Wer nichts weiß und weiß, dass er nichts weiß, weiß mehr als einer, der nichts weiß und nicht weiß, dass er nichts weiß!
Meine Software hat keine Fehler. Sie entwickelt nur manchmal zufällige Features!

VB-freak

Power Clubber

Posts: 507

Location: NRW

Occupation: Informatikstudent

  • Send private message

6

Wednesday, September 13th 2006, 4:17pm

Die "Windows-Gurus" haben diesen Beitrag vllt. noch nicht gelesen oder können ihn aus gesundheitlichen Gründen (z.B. Zahnschmerzen) nicht beantworten.

Vielen Dank an den "Unix-Guru" der diese Frage beantwortet hat!

mfg

der Windows und Linux Guru

vb-freak
Linux is like a wigwam - no windows, no gates, apache inside!

Jockel

Ehrenmitglied mit Auszeichnung

Posts: 3,337

Location: (7<<0xd|0xb<<6|3<<4)+1

Occupation: Wissenschaftlicher Mitarbeiter

  • Send private message

7

Wednesday, September 13th 2006, 4:24pm

Hallo!

Du konntest die Frage ja scheinbar nicht beantworten - deshalb streich mal ganz schnell den Windows-Guru wieder ;)

mfg

Jockel
--------
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: As potential programmers they are mentally mutilated beyond hope of regeneration. [Edsgar W. Dijkstra, 1975]

VB-freak

Power Clubber

Posts: 507

Location: NRW

Occupation: Informatikstudent

  • Send private message

8

Wednesday, September 13th 2006, 9:50pm

Hallo,

war auch nur nen bisschen spaßig gemeint... :P

Naja, lasst uns beim Thema bleiben
Linux is like a wigwam - no windows, no gates, apache inside!

Äd-l

Stamm Clubber

  • "Äd-l" started this thread

Posts: 93

Location: asdf

Occupation: asdf

  • Send private message

9

Thursday, September 14th 2006, 11:53pm

regt euch nicht soo auf der befel get eben nicht !!!

set a=2
set b=3

set /a c=%a% + %b%

=> %c% == 5
;( Beim Programieren kann man viel zerstören aber man kann auch viel erschafen :D

exnase

Active Clubbers

Posts: 696

Location: STD

Occupation: Nicht mehr Student

  • Send private message

10

Friday, September 15th 2006, 12:08am

Äh wie geht nicht?

Source code

1
2
3
4
5
6
C:\>set a=2
C:\>set b=3
C:\>set /a c=%a% + %b%
5
C:\>echo %c%
5

Geht bei mir wunderbar!
Was meinst du denn mit geht nicht? Gibts ne Fehlermeldung oder was?

mfg exnase
Wer nichts weiß und weiß, dass er nichts weiß, weiß mehr als einer, der nichts weiß und nicht weiß, dass er nichts weiß!
Meine Software hat keine Fehler. Sie entwickelt nur manchmal zufällige Features!

Jockel

Ehrenmitglied mit Auszeichnung

Posts: 3,337

Location: (7<<0xd|0xb<<6|3<<4)+1

Occupation: Wissenschaftlicher Mitarbeiter

  • Send private message

11

Friday, September 15th 2006, 7:39am

Hallo!

help set und gucken ob deine DOS-Version /a unterstützt. Und du darfst auch Google benutzen ....

mfg

Jockel
--------
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: As potential programmers they are mentally mutilated beyond hope of regeneration. [Edsgar W. Dijkstra, 1975]

Äd-l

Stamm Clubber

  • "Äd-l" started this thread

Posts: 93

Location: asdf

Occupation: asdf

  • Send private message

12

Friday, September 15th 2006, 3:50pm

ich habs selbst rausgefunden !!!
könnt ihr kopieren



echo off
:nochmal
cls
set a=%random%
set b=%random%
set /a c=%a% + %b%
echo Rechnen
echo ===================================
echo Was gibt:
set y=
set /p y=%a% + %b% =
if not "%y%"=="" set a=%a:~0,1%
if /i "%y%"=="%c%" goto richtig
echo Falsch !!!
ping -n 2 127.0.0.1 >nul
cls
goto nochmal
:richtig
echo RICHTIG !!!
ping -n 2 127.0.0.1 >nul
goto nochmal
;( Beim Programieren kann man viel zerstören aber man kann auch viel erschafen :D

Jockel

Ehrenmitglied mit Auszeichnung

Posts: 3,337

Location: (7<<0xd|0xb<<6|3<<4)+1

Occupation: Wissenschaftlicher Mitarbeiter

  • Send private message

13

Friday, September 15th 2006, 4:34pm

Hallo!

Aaahhhja ... sieht fast wie meins aus ....

mfg

Jockel
--------
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: As potential programmers they are mentally mutilated beyond hope of regeneration. [Edsgar W. Dijkstra, 1975]

Batchfreak

Neuer Clubber

Posts: 5

Location: Leipzig

Occupation: Schüler

  • Send private message

14

Wednesday, December 22nd 2010, 1:10pm

Jep bei mir funzt sie ich find die datei cool

Julian57

Neuer Clubber

Posts: 81

Occupation: Schüler

  • Send private message

15

Wednesday, December 22nd 2010, 1:53pm

[Offtopic]
Schau dir mal das an :D

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
@echo off
title Disco
:Anfang
cls
Set /a f=%random% %% 6 +1
Set /a z1=%random% %% 9
Set /a b1=%random% %% 6 +1
Set /a b2=%random% %% 6 +1
Set /a z2=%random% %% 9
Set /a 1or2=%random% %% 2 +1
Set /a 1bis4=%random% %% 4 +1
If %f% ==1 (goto zz)
If %f% ==2 (goto z)
If %f% ==3 (goto bz)
If %f% ==4 (goto bb)
If %f% ==5 (goto b)
If %f% ==6 (goto zb)
goto Anfang
:zz
cls
color %z1%%z2%
cls
goto Anfang
:z
cls
If %1or2%==1 (goto 1or2z1)
If %1or2%==2 (goto 1or2z2)
:1or2z1
color %z1%
cls
goto Anfang
:1or2z2
color %z2%
cls
goto Anfang
:bz
cls
If is4%==1 (goto 1or2bz1)
If is4%==2 (goto 1or2bz2)
If is4%==3 (goto 1or2bz3)
If is4%==4 (goto 1or2bz4)
:1or2bz1
If ±%==1 (set br3=a)
If ±%==2 (set br3=b)
If ±%==3 (set br3=c)
If ±%==4 (set br3=d)
If ±%==5 (set br3=e)
If ±%==6 (set br3=f)
color %z1%%br3%
cls
goto Anfang
:1or2bz2
If ²%==1 (set br3=a)
If ²%==2 (set br3=b)
If ²%==3 (set br3=c)
If ²%==4 (set br3=d)
If ²%==5 (set br3=e)
If ²%==6 (set br3=f)
color %z2%%br3%
cls
goto Anfang
:1or2bz3
If ±%==1 (set br3=a)
If ±%==2 (set br3=b)
If ±%==3 (set br3=c)
If ±%==4 (set br3=d)
If ±%==5 (set br3=e)
If ±%==6 (set br3=f)
color %z2%%br3%
cls
goto Anfang
:1or2bz4
If ²%==1 (set br3=a)
If ²%==2 (set br3=b)
If ²%==3 (set br3=c)
If ²%==4 (set br3=d)
If ²%==5 (set br3=e)
If ²%==6 (set br3=f)
color %z1%%br3%
cls
goto Anfang
:bb
cls
If ²%==1 (set br1=a)
If ²%==2 (set br1=b)
If ²%==3 (set br1=c)
If ²%==4 (set br1=d)
If ²%==5 (set br1=e)
If ²%==6 (set br1=f)
If ±%==1 (set br2=a)
If ±%==2 (set br2=b)
If ±%==3 (set br2=c)
If ±%==4 (set br2=d)
If ±%==5 (set br2=e)
If ±%==6 (set br2=f)
color %br1%%br2%
cls
goto Anfang
:b
cls
If %1or2%==1 (goto 1or2b1)
If %1or2%==2 (goto 1or2b2)
:1or2b1
If ±%==1 (set br4=a)
If ±%==2 (set br4=b)
If ±%==3 (set br4=c)
If ±%==4 (set br4=d)
If ±%==5 (set br4=e)
If ±%==6 (set br4=f)
color %br4%
cls
goto Anfang
:1or2b2
If ²%==1 (set br4=a)
If ²%==2 (set br4=b)
If ²%==3 (set br4=c)
If ²%==4 (set br4=d)
If ²%==5 (set br4=e)
If ²%==6 (set br4=f)
color %br4%
cls
goto Anfang
:zb
cls
If is4%==1 (goto 1or2zb1)
If is4%==2 (goto 1or2tb2)
If is4%==3 (goto 1or2zb3)
If is4%==4 (goto 1or2zb4)
:1or2zb1
If ±%==1 (set br3=a)
If ±%==2 (set br3=b)
If ±%==3 (set br3=c)
If ±%==4 (set br3=d)
If ±%==5 (set br3=e)
If ±%==6 (set br3=f)
color %br3%%z1%
cls
goto Anfang
:1or2zb2
If ²%==1 (set br3=a)
If ²%==2 (set br3=b)
If ²%==3 (set br3=c)
If ²%==4 (set br3=d)
If ²%==5 (set br3=e)
If ²%==6 (set br3=f)
color %br3%%z2%
cls
goto Anfang
:1or2zb3
If ±%==1 (set br3=a)
If ±%==2 (set br3=b)
If ±%==3 (set br3=c)
If ±%==4 (set br3=d)
If ±%==5 (set br3=e)
If ±%==6 (set br3=f)
color %br3%%z2%
cls
goto Anfang
:1or2zb4
If ²%==1 (set br3=a)
If ²%==2 (set br3=b)
If ²%==3 (set br3=c)
If ²%==4 (set br3=d)
If ²%==5 (set br3=e)
If ²%==6 (set br3=f)
color %br3%%z1%
cls
goto Anfang

Oder das 8o

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@echo off
:1
set zahl=0
title Gedankenleser
echo.
echo **Gedankenleser**
echo.
echo Waehle eine Aktion aus!!!
echo  [1]Gedankenleser starten
echo  [2]Progamm beenden
set /p a=
If %a%==2 (exit)
If %a%==1 (goto lesen)
cls
goto 1
:lesen
cls
echo.
echo  ** Beschreibung **
echo.
echo  Denk Dir eine Zahl zwischen 1 und 63 aus.
echo  Es werden 6 Karten eingeblendet.
echo  Nach der letzten Karte habe ich Deine Zahl herausgefunden.
echo.
echo  Bitte druecken sie eine beliebige Taste um fortzufahren...
pause > nul
:Karte1
cls
echo.
echo  Ist Deine Zahl auf der unteren Karte abgebildet?
echo  -----------------------
echo  ** Karte 1 **
echo  1  3  5  7  9  11 13 15
echo  17 19 21 23 25 27 29 31 
echo  33 35 37 39 41 43 45 47 
echo  49 51 53 55 57 59 61 63
echo  -----------------------
echo  [j]Ja, [n]Nein, [x]Beenden
set /p b=
If %b%==x (exit)
If %b%==n (goto Karte2)
If %b%==j (set /a zahl=%zahl%+1 & goto Karte2)
cls
goto Karte1
:Karte2
cls
echo.
echo  Ist Deine Zahl auf der unteren Karte abgebildet?
echo  -----------------------
echo  ** Karte 2 **
echo  2  3  6  7  10 11 14 15
echo  18 19 22 23 26 27 30 31 
echo  34 35 38 39 42 43 46 47 
echo  50 51 54 55 58 59 62 63
echo  -----------------------
echo [j]Ja, [n]Nein, [x]Beenden
set /p c=
If %c%==n (cls & goto Karte3)
If %c%==x (exit)
If %c%==j (set /a zahl=%zahl%+2 & cls & goto Karte3)
cls
goto Karte2
cls
:Karte3
echo.
echo  Ist Deine Zahl auf der unteren Karte abgebildet?
echo  -----------------------
echo  ** Karte 3 **
echo  4  5  6  7  12 13 14 15 
echo  20 21 22 23 28 29 30 31 
echo  36 37 38 39 44 45 46 47 
echo  52 53 54 55 60 61 62 63
echo  ------------------------
echo  [j]Ja, [n]Nein, [x]Beenden
set /p d=
If %d%==x (exit)
If %d%==j (set /a zahl=%zahl%+4 & cls & goto Karte4)
If %d%==n (cls & goto Karte4)
cls
goto Karte3
cls
:Karte4
echo.
echo  Ist Deine Zahl auf der unteren Karte abgebildet?
echo  -----------------------
echo  ** Karte 4 **
echo  8  9  10 11 12 13 14 15 
echo  24 25 26 27 28 29 30 31 
echo  40 41 42 43 44 45 46 47 
echo  56 57 58 59 60 61 62 63
echo  ------------------------
echo  [j]Ja, [n]Nein, [x]Beenden
set /p e=
If %e%==x (exit)
If %e%==j (set /a zahl=%zahl%+8 & cls & goto Karte5)
If %e%==n (cls & goto Karte5)
cls
goto Karte4
cls
:Karte5
echo.
echo  Ist Deine Zahl auf der unteren Karte abgebildet?
echo  -----------------------
echo  ** Karte 5 **
echo  16 17 18 19 20 21 22 23 
echo  24 25 26 27 28 29 30 31 
echo  48 49 50 51 52 53 54 55 
echo  56 57 58 59 60 61 62 63
echo  ------------------------
echo  [j]Ja, [n]Nein, [x]Beenden
set /p f=
If %f%==x (exit)
If %f%==j (set /a zahl=%zahl%+16 & cls & goto Karte6)
If %f%==n (cls & goto Karte6)
cls
goto Karte5
cls
:Karte6
echo.
echo  Ist Deine Zahl auf der unteren Karte abgebildet?
echo  -----------------------
echo  ** Karte 6 **
echo  32 33 34 35 36 37 38 39 
echo  40 41 42 43 44 45 46 47 
echo  48 49 50 51 52 53 54 55 
echo  56 57 58 59 60 61 62 63
echo  ------------------------
echo  [j]Ja, [n]Nein, [x]Beenden
set /p g=
If %g%==x (exit)
If %g%==j (set /a zahl=%zahl%+32 & cls & goto Ergebnis)
If %g%==n (cls & goto Ergebnis)
cls
goto Karte6
:Ergebnis
cls
echo.
echo  Die Zahl, die Du dir ausgedacht hast, lautet :	
echo  -- [ %zahl% ] --
echo.
echo  Waehle eine aktion aus:
echo   [N]Nochmal,[X]Beenden
set /p h=
If %h%==x (exit)
If %h%==n (cls & set zahl=0 & goto lesen)
cls
goto Ergebnis


Gruß

Julian
[/Offtopic]
Rechtschreibfehler sind geistiges Eigentum des Verfassers!!!

Rolf

Moderatorenleitung

Posts: 1,073

Location: Tessin (Schweiz)

Occupation: *

  • Send private message

16

Friday, December 24th 2010, 5:31pm

geschlossen
Wenn Du entdeckst, dass Du ein totes Pferd reitest, steig ab. Weisheit der Dakota Indianer

Social bookmarks

Rate this thread