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
Accountancy,
2 months ago
Math,
2 months ago
Hindi,
2 months ago
Math,
5 months ago
India Languages,
5 months ago
Social Sciences,
11 months ago
History,
11 months ago
English,
11 months ago