-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
70 lines (66 loc) · 2.91 KB
/
test.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
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Code Snippets</title>
<!-- Bootstrap CSS -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="row">
<h2> Challenge Yourself</h2>
<p>The following programs are challenges are designed to test your understanding of the material we covered in Chapter 3</p>
<h3>Some variables are more equal than others:</h3>
<p>Create a program to compare the values of two variables. You should test for the following conditions: <br>
<code>>, <, >=, <=, ==, !=</code><br>
You should tell your user which of the above comparissons you were using and what it returned, i.e. 0 or 1.
</p>
<a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
Show Code
</a>
<div class="collapse" id="collapseExample">
<div class="well">
<code data-gist-id="c11031cbc86836811d7e" data-gist-hide-footer="true" data-gist-file="conditions01.c"></code>
</div>
</div>
</div>
<div class="row">
<h3>If this, then that:</h3>
<p>Using the same two variables check if <code>i</code> is greater than <code>j</code>, <code>i</code> is less than
or if both <code>i</code>
and <code>j</code> are equal.</p>
<a href="#code2" class="btn btn-primary" data-toggle="collapse">
Show code
</a>
<div class="collapse" id="code2">
<code data-gist-id="c11031cbc86836811d7e" data-gist-hide-footer="true" data-gist-file="conditions02.c"></code>
</div>
</div>
<div class="row">
<h3>Live long and prosper:</h3>
<p>Use logic operators, <code>&&</code>, <code>||</code>, and <code>!=</code> to test for a variety of coditions.</p>
<a href="#code3" class="btn btn-primary" data-toggle="collapse">
Show code
</a>
<div class="collapse" id="code3">
<code data-gist-id="c11031cbc86836811d7e" data-gist-hide-footer="true" data-gist-file="conditions0.c"></code>
</div>
</div>
</div> <!-- end of container -->
<!-- jQuery -->
<script src="//code.jquery.com/jquery.js"></script>
<!-- Bootstrap JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<!-- Gist Embed -->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/gist-embed/2.1/gist-embed.min.js"></script>
</body>
</html>