+ 1

Need help with C# question

Ive been trying to learn the C# way of coding and came across a question in the module 5 quiz of this course that should ve the last question. It deals with: in the word "Sololearn"; x: finding the length, y: finding the index of "e" and then finding the modulus of x%y. The answer is 4 and i cant fugure out how.

9th Sep 2017, 10:43 PM
Cameron
3 Réponses
+ 2
length is an actual number of letters = 9; index of 'e' is 5, because indexation begins from "0". 9%5 = 4
9th Sep 2017, 11:09 PM
Топчий Анастасия Александровна
Топчий Анастасия Александровна - avatar
+ 2
Sololearn e is the 6th letter from the left so y=5 It has 9 letters so x=9 9%5=4
9th Sep 2017, 11:20 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
sorry'
25th Oct 2019, 1:51 AM
FRANKIS