Skip to content

Commit f8c8c35

Browse files
authored
grains exercise: Split into introduction and instructions (#2524)
1 parent 8b5bd7c commit f8c8c35

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

exercises/grains/description.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

exercises/grains/instructions.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Instructions
2+
3+
Calculate the number of grains of wheat on a chessboard.
4+
5+
A chessboard has 64 squares.
6+
Square 1 has one grain, square 2 has two grains, square 3 has four grains, and so on, doubling each time.
7+
8+
Write code that calculates:
9+
10+
- the number of grains on a given square
11+
- the total number of grains on the chessboard

exercises/grains/introduction.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Introduction
2+
3+
There once was a wise servant who saved the life of a prince.
4+
The king promised to pay whatever the servant could dream up.
5+
Knowing that the king loved chess, the servant told the king he would like to have grains of wheat.
6+
One grain on the first square of a chessboard, with the number of grains doubling on each successive square.

0 commit comments

Comments
 (0)