Convert the following for loop into while loop:
for k in range (10,20,5):
print(k)
Answers
Answered by
4
Answer:
;-;
Explanation:
a=10
while a<20:
print (a)
a+=5
Answered by
10
Question :
To Convert the following for loop into while loop.
Given For Loop :
for k in range (10,20,5):
print(k)
Solution :
In While Loop :
#include <iostream>
using namespace std;
int main ( )
{
int a ;
k = 10
while k<20 ;
Print ( k )
k + = 5
}
Syntax of for Loop Statement :
for( initialisation ; condition ; updation )
{
< Statement ( s ) >
}
Syntax of While Loop Statement :
while ( <expression> )
{
< Statement (s) >
}
Anonymous:
Perfect answer :D
Similar questions
Math,
2 months ago
History,
2 months ago
Math,
4 months ago
India Languages,
4 months ago
Social Sciences,
10 months ago
History,
10 months ago
English,
10 months ago