0
I am running through the lessons, can this be simplified, multiples of 3
2 ответов
0
Improvements can be done in lot of ways.. It's may different from different persons so comes to opinion based so better to use feed post for these kind of questions..
One way :
Use if (x%3==0) directly instead of declaring c..
Else starts from x=0 and without if part print by increasing x=x+3..
0
Thanks for the input.
I was able to remove the c declaration. Still new to this. Was able to piece together the above solution now was looking to get some input from more experienced users. Best way to learn I think.