if input is 0 150 17 the last number is 17
i need program that find how many 17 in 0 to 150?
output should be 2
the program should run for any 3 input number
Time to play computer! Take a piece of paper and a pencil. On top put **i** , **j** , **Count** , perhaps **j%10** etc. Now start looping and fill in line per line, the values of the variables or expressions. Do this until **i <= to** or until you find … Read More
In your for loop you are setting **i** equal to **from** (following your example (0 150 17)) Then you are setting **j** equal to **i** , **i** being **0** (You should have written that on your paper!) While loop does not get executed. Next **i** becomes 1 and so is … Read More
Hello the_yuo You keep saying what you want. You are not prepared to try the excellent advice you have been given, so you do not understand how your existing code works. let alone understand how to change it. Unless you are prepared to show some effort in trying to help … Read More
Edited by Phillamon
Edited by ddanbe: Listening to the moderator who is correct.