Computer Science, asked by madhulatha010899, 5 months ago

Time left: 0 hours, 54 minutes
easy
String Challenge
Have the function stringchallenge (num) take the
num parameter being passed and return all the
numbers from 1 to num separated by spaces, but
replace every number that is divisible by 3 with the
word "Fizz", replace every number that is divisible by 5
with the word "Buzz", and every number that is
divisible by both 3 and 5 with the word
"String Challenge". For example: if num is 16, then your
program should return the string "1 2 Fizz 4 Buzz Fizz
7 8 Fizz Buzz 11 Fizz 13 14 String Challenge 16". The
input will be within the range 1 - 50.
Examples
Input: 3
Output: 1 2 Fizz
Input: 8
Output: 1 2 Fizz 4 Buzz Fizz 7 8
Browse Resources
powered by Google
Search for any help or documentation you might need​

Answers

Answered by sathvi015
0

Answer:

I am not able to understand about this

Similar questions