-
Notifications
You must be signed in to change notification settings - Fork 1
/
draw_square_v1_FR.html
60 lines (59 loc) · 1.26 KB
/
draw_square_v1_FR.html
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
<html>
<head>
<title>Learn Javascript!</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="../lib/iokranf.js"></script>
<style>@font-face { font-family: Square; src: url('media/square.ttf'); }</style>
</head>
<body>
<h1>Learn Javascript</h1>
<pre id="iokranf_container" style="height: 600px; font-size:6pt; font-family: Square;"></pre>
<script>
"use strict";
var io=new IOKranf('iokranf_container');
(async function() {
var j;
io.println('Hello World!');
io.printhr();
var n=await io.input('Donnez la taille du carré:');
if(n==1)
io.print("*");
else
{
var i;
for(i=0;i<n;i+=1)
{
io.print("*");
}
io.println("");
for(j=0;j<n-2;j+=1)
{
io.print("*");
for(i=0;i<n-2;i+=1)
{
io.print(" ");
}
io.println("*");
}
for(i=0;i<n;i+=1)
{
io.print("*");
}
io.printhr();
}
/* var ligne='**********';
io.println(ligne);
io.println('* *');
io.println('* *');
io.println('* *');
io.println('* *');
io.println('* *');
io.println('* *');
io.println('* *');
io.println('**********');
*/
io.close();
})();</script>
</body>
</html>