Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
20
Task/Count-the-coins/FutureBasic/count-the-coins.futurebasic
Normal file
20
Task/Count-the-coins/FutureBasic/count-the-coins.futurebasic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
include "ConsoleWindow"
|
||||
|
||||
dim as long penny, nickel, dime, quarter , count
|
||||
|
||||
penny = 1 : nickel = 1
|
||||
dime = 1 : quarter = 1
|
||||
|
||||
for penny = 0 to 100
|
||||
for nickel = 0 to 20
|
||||
for dime = 0 to 10
|
||||
for quarter = 0 to 4
|
||||
if penny + nickel * 5 + dime * 10 + quarter * 25 == 100
|
||||
print penny; " pennies "; nickel;" nickels "; dime; " dimes "; quarter; " quarters"
|
||||
count++
|
||||
end if
|
||||
next quarter
|
||||
next dime
|
||||
next nickel
|
||||
next penny
|
||||
print count;" ways to make a dollar"
|
||||
Loading…
Add table
Add a link
Reference in a new issue