0

Debugging

package main import "fmt" func main() { fmt.println("1,2,3") fmt.println("One\nTwo\nThree") } How do I print out this digits in words Nd on a new line What is there tht am doing wrong

1st Oct 2021, 8:33 AM
Ejeh Wayne
Ejeh Wayne - avatar
9 Antworten
+ 1
&A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ That is the same thing i did
1st Oct 2021, 9:08 AM
Ejeh Wayne
Ejeh Wayne - avatar
+ 1
P should be uppercase in println fmt.Println("1,2,3") fmt.Println("One\nTwo\nThree")
1st Oct 2021, 9:24 AM
Simba
Simba - avatar
+ 1
For that, you need to use input variable inside a loop and run it three times. You can use if-else statement or switch statement to check each numbers one by one.
1st Oct 2021, 10:54 AM
Simba
Simba - avatar
+ 1
Ejeh Wayne you too You tried anything using my comment?
1st Oct 2021, 12:39 PM
Simba
Simba - avatar
0
\n is used to print in new line.
1st Oct 2021, 8:35 AM
A͢J
A͢J - avatar
0
Simba The upper case worked but its not enough code this is the problem i was asked to solve and its still not working You are making a robot that can speak numbers. Your robot should take 3 numbers in the range of 0-10 as input and output the corresponding texts in English. Sample Input: 8 0 5 Sample Output: Eight Zero Five
1st Oct 2021, 10:25 AM
Ejeh Wayne
Ejeh Wayne - avatar
0
Simba show me
1st Oct 2021, 11:37 AM
Ejeh Wayne
Ejeh Wayne - avatar
0
Simba i tried it and it did not work,... maybe i just did not understand it, cause it did not work
1st Oct 2021, 12:50 PM
Ejeh Wayne
Ejeh Wayne - avatar
0
Ejeh Wayne Hint- 1 -Make a function with a parameter and write switch case there. 2 - call that function 3 times and pass different inputs which will print corresponding results
1st Oct 2021, 3:16 PM
A͢J
A͢J - avatar