+ 1
If u get a input from.user for example 4 and want to generate a loop of even numbers if u generate numbers like 2,4,6,8 then how
can i delete a number which was input i want a output without user input number or skip the user input number like 2 6 8
3 Respostas
+ 4
AS Meet Mehta as said store the input in a variable. Create a loop starting from 1 to n number. Make an if-else statement to skip the odd numbers by continue. And also if the i is equal to the input.
+ 1
Store user input in a variable and in for loop use if statement in which set condition that if value is equal to user input than use
continue;
statement which skip that particular iteration.
0
thank u bro