Suggested breakdown of task
Download
Report
Transcript Suggested breakdown of task
1.
Write program to print out 1-100 in 10 x 10 table
1.
Set up variable to contain number to print out
2.
For loops (outer and inner) to print out row and columns
3.
Print out numbers 1-100, each row = multiples of 10
2.
Draw header and border
3.
Evaluate numbers for Fizz
Evaluate if number is divisible by 3
1.
1.
Use if statement to test number modulus % 3==0
Evaluate if number contains 3
2.
1.
2.
3.
Use if statement to test number modulus % 10==3 (13,23, etc)
Use (number-(number%10))%10 ==3
OR use number/10==3
Print output to console
(31,32,34,38)
4. Evaluate numbers for Buzz
Evaluate if number is divisible by 7
1.
1.
Evaluate if number contains 7
2.
1.
2.
3.
Use if statement to test number modulus % 7==0
Use if statement to test number modulus % 10==7 (17,37, etc)
Use (number-(number%10))%10 ==7
OR use number/10==7
(71 etc)
Print output to console
5. Evaluate numbers for FizzBuzz
If number is Fizz && number is Buzz = print FizzBuzz