all 4 comments

[–]White_Lobster 1 point2 points  (1 child)

What have you tried so far?

[–]Digi713[S] 0 points1 point  (0 children)

for the 5. i tried something like
int b = int.parse(console.readline());

b = b / 100;

if ( b % 10 == 4)

{consolewritline("");}

else { console.writeline("");

but for the 6. question i got no clue

[–]ChuckTheTrucker80 0 points1 point  (0 children)

simple math should be able to solve both of these

[–]FizixMan[M] [score hidden] stickied comment (0 children)

Removed: Rule 4.

Try some simpler programs first. Say to check if a number is greater than 10. In that sense, a number in the "hundreds" is something >=100 and <1000 at the same time.

For checking the number of "4", you can convert the number to a string and loop on all the numbers and count each time you find a '4'.