Answer:
See attachment for flowchart
Explanation:
Required
Flowchart to fine even from 1 to 50
The flowchart has been attached.
The rough algorithm (explanation) of the flowchart is as follows.
1. Start
2. Initialize num to 1
3. Check if num is less than or equal to 50
3.1 If yes
3.1.1 Check if num is even
3.1.1.1 If yes
3.1.1.2 Print num
3.1.3 Increase num by 1
3.2 If num is greater than 50
3.2.1 Stop
4. Goto 3
Answer:
Green computing is also known as green information technology (green IT)
Loop takes only positive numbers and terminates once it encounters a negative numbers.
Answer and Explanation:
Using javascript:
Var positiveInt= window.prompt("insert positive integer");
While(positiveInt>=0){
Alert("a positive integer");
Var positiveInt= window.prompt("insert positive integer");
}
Or we use the do...while loop
Var positiveInt= window.prompt("insert positive integer");
do{
Var positiveInt= window.prompt("insert positive integer");
}
While (positiveInt>=0);
The above program in javascript checks to see if the input number is negative or positive using the while loop condition and keeps executing with each input until it gets a negative input
Answer:
The <em>break</em> keyword is how you interrupt a while loop.
the syntax looks like this ↓
Python ↓
while <em>true</em>:
<em>break</em>
Java script ↓
while (<em>true</em>);
<em>break</em>