Task 4: sixfive
Multiples of 3 or 7 – Change the logic to print numbers that are multiples of 3 or 7 instead of 5 or 6.
Multiples of 30 – Modify the program to only print numbers that are both multiples of 5 AND 6 (multiples of 30).
Custom Separators – Update the separator string to include custom characters like
@,#, or$.Match Counter – Instead of printing the numbers, print the total count of how many matches were found in the file.
Standard Input Support – Modify
sixfiveto read from standard input (0) if no filename argument is provided.Range Filter (10-100) – Implement a range filter to only print matching numbers that fall between 10 and 100.
Hexadecimal Output – Change the output format to print all identified numbers in hexadecimal.
Exclude Number 6 – Modify the code so that it never prints the number 6, even if it is a multiple of 6.
Sum Summary – Add a summary at the end of the output that prints the total sum of all numbers found.
Filename Header – Update the program to print the filename on the first line before listing the numbers found within.
Last updated